Forums

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

Home Forums CSS Nav across the top of a page?

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #40342
    c_parsonage
    Member

    I was wondering if anyone could help me create a nav bar that goes across the top of a page opposed to down the side? I dont know why but I just cant get it to work!

    #112063
    Kitty Giraudel
    Participant

    I’m not sure to understand what you want to do. Do you have some code sample or design shot to show us? It would help us to understand and try some things.

    #112064
    c_parsonage
    Member

    like the menu at the top of this web page

    #112065
    Kitty Giraudel
    Participant

    Oh. Fairly simple, use an unordered list, and make <li> tags float with float: left;. Done.

    #112070
    Paulie_D
    Member

    This might help: http://bit.ly/RBO0OI

    #112072
    Watson90
    Member

    Haha, @Paulie_D…classic!

    @HugoGiraudel is correct, you just need to float your

  • tags to the left so they line up side by side as opposed to stacking on top of one another.
#112073
Paulie_D
Member

Or…instead of float, you could use inline:block….a lot of developers prefer it.

Me…I’m happy to go with what works in each particular situation, both options have their advantages and disadvantages.

#112124
GMB
Participant

@Paulie_D: you mean display:inline-block?

FWIW I’ve always used display:inline for horizontal nav bars.

#112134
Paulie_D
Member

Sorry…Yes.

inline-block

#112457
c_parsonage
Member

thanks guys, that is great :)

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