Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Menu bar?

  1. #1
    Regular Coder
    Join Date
    Apr 2005
    Posts
    315
    Thanks
    18
    Thanked 2 Times in 2 Posts

    Menu bar?

    I'm developing a page;
    http://moderntimes.com/tmp
    I would like the menu bar to reach the boundary on the right, without padding, because padding is hit and miss. Is there a way to have each of the link buttons automatically stretch, (maybe not a good analogy). Anyway, any suggestions.

    Thanks

  • #2
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Since you are using a fixed-with footer img, could you just set the navcontainer div's width to 633px?

    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #3
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,302
    Thanks
    28
    Thanked 276 Times in 270 Posts
    To do what you’re asking, you would use the code below. It won’t work in Internet Explorer though.

    ul { display: table; width: 100%; }
    li { display: table-cell; }


    You could float the list item elements, but then you’d need to set explicit widths on them. I don’t suppose that would be a problem though since you, again, already have a fixed‐width footer.

    Alternatively, you could use percentage‐based widths, but then you’d need display: inline-block since you can’t set widths on normal inline elements. Internet Explorer doesn’t support it on elements that aren’t naturally inline and Firefox only supports it through a bugged proprietary implementation. I suppose switching to span elements instead of list item elements might work, but then that wouldn’t be as semantically correct.
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •