SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Thread: navigation help

  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2009
    Location
    Limbo
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    navigation help

    Hi, I'm trying to create a certain navigation for a site of mine however, I'm having trouble in creating it. I've tried various things however, it hasn't been working. Could anyone shed some light on how to do a navigation with some subtext which are both aligned as center? The following is what I'm trying to accomplish.




    If anyone would help me out with this, it would be amazing!

    Thank you in advance!

  2. #2
    SitePoint Evangelist TommiChi's Avatar
    Join Date
    Oct 2008
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Each section would have a container element. You should set text-align:center for this element. The container should contain to child elements, that would both be centered due to what was set at the parent level....

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2009
    Location
    Limbo
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So I wouldn't be using the list method to get this done?

  4. #4
    SitePoint Evangelist TommiChi's Avatar
    Join Date
    Oct 2008
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can if you want to. The point is that the container can be anything you like; a floated DIV, and inline-block SPAN, a LI item. All you need to remember is that if you set the text-align to center on the container element, then all children will be centered unless explicitely defined

  5. #5
    SitePoint Enthusiast
    Join Date
    Aug 2009
    Location
    Limbo
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TommiChi View Post
    Each section would have a container element. You should set text-align:center for this element. The container should contain to child elements, that would both be centered due to what was set at the parent level....
    I tried to do that, it worked. However I'm having trouble to get the containers to be inline... one next to the other...

  6. #6
    SitePoint Evangelist TommiChi's Avatar
    Join Date
    Oct 2008
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are nesting your menu items inside LI elements, then you have to make the LI an inline-block and let it float left. This should solve you problem

  7. #7
    SitePoint Enthusiast
    Join Date
    Aug 2009
    Location
    Limbo
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm having trouble with the LI having the subtext. would it be just another il, and separate the tabs as a differnt UL? I'm really having trouble with the organization of this.

    You've been really helpful so far thanks!

  8. #8
    SitePoint Enthusiast
    Join Date
    Aug 2009
    Location
    Limbo
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've finally figured it out! Thank you!


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
  •