There is a select and you can’t even align it in the center on the mobile phone, although everything is fine on the desktop.

select {
display: block;
        height: 100%;
        padding-left: 0;
        font-family: $f-medium;
        font-size: 26px;
        font-weight: 500;
        text-align: center;
        text-align: -webkit-center;
        border: 1px solid red! important;

        text-align-last: center;
        -moz-text-align-last: center;
        appearance: none;

  • position: relative;
    left: 50%;
    transform: translateX(-50%);

    Is done
    – Xenophobic6 Jul 9 '19 at 12:07
  • I do not need to align the center itself, it is already in the center, but the text in it on the mobile phone does not behave like it is on the desktop, it is aligned to the left. – Eager57 Jul 9 '19 at 13:53

1 Answers 1

Try position: absolute;
left: 30px;
  • This will just move the select 30pc to the left and that's it, but it won't align the text in the center. – Eager57 Jul 9 '19 at 13:11
  • [[ziqq]], Try flex. – Star Trek Jul 9 '19 at 14:16
  • The same result, tried already. – Eager57 Jul 9 '19 at 16:23
  • [[ziqq]], then try padding: 0;
    or padding-right: 0;
    – Dangerous23 Jul 9 '19 at 17:09
  • [[BandFourse]], tried the same, same – Eager57 Jul 10 '19 at 08:45
  • First you need to look at the styles of the wrapping container.If flex is used there, text-align cannot work, and you need to deal with styles in flex conditions, decide at the parent level, align-items for example. – Black5 Jul 11 '19 at 08:43
  • [[strelok011]], The fact is that the select itself is centered with it, everything is OK, but the text inside is not centered in any way - it only happens on IOS. – Eager57 Jul 11 '19 at 16:41
  • [[ziqq]] I apologize, I didn’t understand the task correctly.A select is a native form element that is rendered in different browsers as the developers want, with a bunch of restrictions.their och mnogo.Nu, or score :)
    The same trouble with the input field for downloading the file, by the way.Only worse.
    – Black5 Jul 11 '19 at 18:12