• Hi everyone, my website is at: https://hoctracnghiem.tk. I have been able to change the color, add and remove items from the wpadminbar, but, how could I do padding on both sides?.

    I have done:

    #wpadminbar {
      height: 35px;
      padding-top:5px;
      padding-bottom:5px;
      padding-left: 55px;
    }

    Yes, it worked, but in the way that, the right-most item is overflow,and I only could see half of it (other half is invisible).
    Adding padding-right does not solve the problem also.

Viewing 1 replies (of 1 total)
  • Hey there van7hu,

    How are you doing today?

    This happens because width of the admin bar is 100% so adding padding on one side is actually pushing the whole admin bar to one side. To fix this you can reduce the total width of admin bar and add left and right padding in %.

    Please try adding the following:

    div#wpadminbar {
      width: 94%;
      padding-left: 3%;
      padding-right: 3%;
    }

    You can play with numeric values to increase/decrease the padding to what ever suits you the most.

    Hope this helps ??

    Best regards,
    Bojan

Viewing 1 replies (of 1 total)
  • The topic ‘wpadminbar, padding-left and padding right.’ is closed to new replies.