Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

CSS only horizontal nav bar with drop downs

  • 24-08-2011 04:56PM
    #1
    Registered Users, Registered Users 2 Posts: 19,075 ✭✭✭✭


    Hello all,
    At the minute I'm doing the first draft build of a site and the designer and the owners keep changing their minds about things and generally doing my head in. Anyway, I had finished the horizontal nav bar according to the initial design drafts. I made the bar using a ul with style "display:table" the li elements inside with style "display:table-cell" to get them to spread out and take up the full width of the nav bar.

    Now they want to add drop downs to this but tbh I'm not sure how. I checked a few tuts on CSS dropdown menus and the ones I found all relied on the li elements in the navbar being floated.

    Does anyone know of a solution (just point me in the right direction) please? Doesn't have to keep the table/table-cell setup, so long as the menu items expand to take up the full width of the navbar it's fine. Thanks for any and all help!


Advertisement