• Resolved ashlilee

    (@ashlilee)


    Hi Everyone!

    I have my blog mostly up and running but I’m still having a problem centering the page titles in my navigation bar.

    https://www.foreverashley.com/

    I tried text-align: center; but it didn’t work. If anyone could help me I would really appreciate it. Thank you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hey,

    I think the easiest way is to apply some padding-left to main menu, try this:

    .navbar-nav {
    float: left;
    margin-top: 0;
    margin-bottom: 0;
    padding-left: 105px;

    Very clean and beautiful website by the way!

    Plz let us know if that works.

    Thread Starter ashlilee

    (@ashlilee)

    Thanks! It sort of worked (unless I put it in the wrong place). It did add padding to the left to kind-of center it (I could have adjusted the px to make it perfect) but it also added a gray background to the selected page and resulted in the little box around the post date to disappear and mis-align. ??

    Are you sure you targeted the right element?

    <ul id=”main-menu” class=”nav navbar-nav”>

    I believe if you apply the necessary padding-left to that element, that should do the job without a problem.

    I hope we are actually talking about the same thing.

    Thread Starter ashlilee

    (@ashlilee)

    I’ll try again just to be sure. Maybe I put it in the wrong place. Will this affect it being responsive on mobile and tablets? I was hoping there was a way to center it without adding specified padding px.

    Really appreciate your help. I’ve been struggling with it for two days.

    Thread Starter ashlilee

    (@ashlilee)

    Beautiful! Thanks so much! It worked and looks good. I don’t think it will continue to be responsive on mobile / tablets but it looks good on this computer. I’m going to check it on other screens and see how it looks.

    Appreciate it!

    Well, that solves the problem on desktop but you website should look great on all devices. Would you please try margin-left: 10%; instead padding-left: 150px;

    Thread Starter ashlilee

    (@ashlilee)

    Perfect! That totally did it and it looks great on iPad. You’re awesome! Thank you so much.

    I’m very glad that it worked ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Center the pages in my navigation bar’ is closed to new replies.