SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Quake 1 Addict CreedFeed's Avatar
    Join Date
    Feb 2002
    Location
    Milwaukee, WI
    Posts
    296
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Centering Navigation Tabs - Help?

    I've search these forums and found several threads about this topic but none have any real answers to this issue.

    I've got some navigation tabs, similar to Sitepoint's tabs. How does one go about centering them in the page?

    My site: http://www.webhelpzone.com/
    CSS: Page Layout and Navbar Styles

    I've tried doing this:

    Code:
    ul#nav {
    	position: absolute;
    	left: 50%;
    	width: 505px;
    	margin-left: -252px;
    }
    Which actually centers the navigation bar, but when the browser is shrunk down, the bar ends up being pushed off the screen. Sitepoint's nav bar just shrinks down, remaining centered in the browser window.

    How do you accomplish the centering of navigational tabs?
    -- Steve Caponetto
    Quake 1 Resurrection :: CreedFeed

  2. #2
    [Biped] LJK's Avatar
    Join Date
    Jun 2004
    Location
    In My Jammies
    Posts
    761
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi -
    Did you try just setting the ul to margin:0 auto;?
    [With text-align:center; on the body for IE...]

    El
    F-Fox 2.0 :: WIN :: el design :: US

  3. #3
    Quake 1 Addict CreedFeed's Avatar
    Join Date
    Feb 2002
    Location
    Milwaukee, WI
    Posts
    296
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That doesn't work because the list items are floating.
    -- Steve Caponetto
    Quake 1 Resurrection :: CreedFeed


Bookmarks

Posting Permissions

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