Forums

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

Home Forums CSS li elements won’t display as block

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #44625
    codecreative
    Participant

    Hi

    I have a nav menu as follows

    And I can’t get it to display each nav element on a new line. I have set it to display block. Firebug shows both the li and the ` `elements with display: block applied

    Any ideas? They are being rendered inline

    #134431
    iknowdavehouse
    Participant

    The default behaviour of a ul would be to show the li’s on a new line as you desire… if they are positioned horizontally then a float must have been applied at some point. Are you editing someone elses code?

    I can’t see any nav on the link you’ve supplied so it’s hard to tell.

    #134432
    Paulie_D
    Member

    We’d need to see the CSS.

    Also, you really don’t need that div inside the nav

    #134434
    iknowdavehouse
    Participant

    There’s a hell of a lot of classes and an id on each of those li’s (and the bottom 2 are missing the closing tag) – do they need that many classes on such a simple nav?

    As Paulie_D says – need to see the CSS relating to all of those class names. I imagine there is a float: left somewhere.

    #134435
    darrylm
    Member

    Those classes are thanks to WordPress, aren’t they?

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