Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Making navigation span width of allocated area

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #200826
    rebecca
    Participant

    Hi,

    I was wondering if anyone could help me figure out how to make my navigation span the full width of the allocated area? I’ve tried to figure out how to target it and can’t figure it out, so any help is greatly appreciated!

    Link to site:
    http://axax1678.staging-cloud.netregistry.net/home/

    #200830
    rebecca
    Participant

    Sorry, I mean the text to be evenly spaced along the grey bar.

    #200844
    Paulie_D
    Member

    You have a lot of padding on the links

    ul#main-nav li a {
      padding: 1em 3.1em !important;
    }
    

    The principal reason I suspect is because your menu is floated with the fl class.

    If you remove that the menu uncollapses and becomes 100% wide.

    If you need the list items equal, you could just make the li 20% wide (100% / no. of list items) and adjust as required.

    #200853
    Paulie_D
    Member

    If you will always have 6 menu items,

    I must have miscounted.

    Or we could go the display:table / dispay:table-cell route.

    http://codepen.io/Paulie-D/pen/QbWWrv/

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.