Treehouse: Grow your CSS skills. Land your dream job.

Horizontal and Vertical center menu items

  • # November 27, 2011 at 3:00 am


    I am working on a navigation menu for a new site and want to center the text for the navigation horizontally and vertically. If you could take a look at my fiddle I would appreciate it.


    # November 27, 2011 at 3:58 am

    Try this….i forked it into a new fiddle for you in case you want to reference the old one…

    I dont know how wide your navigation menu is but this should be just fine…

    # November 28, 2011 at 12:58 am

    Thanks @kgscott284.

    Is there any way of making the width change with the width of the browser? I am wanting to use this on a responsive site, and was hoping to make it change fluidly rather than changing the font size/height.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.