Forums

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

Home Forums CSS Nested div positioning issue

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #37958
    edharrison89
    Member

    Im having trouble positioning a logo and list of buttons in a fixed nav… im a bit of a rookie and i have been trying to get my head around this for hours!

    Basically my div just wont centre and its getting pushed to the right o my nav menu. You’ll see what I mean on the site-
    http://edharrisondesign.com/long-letter/

    Any help would be much appreciated!

    #102422
    Senff
    Participant

    A

      can only contain

    • elements as direct descendants/children (and the

    • s can contain all kinds of elements).
      What you have, is DIVs and IMGs in the ULthat are not wrapped in LIs.

      Start with fixing that and then position your elements the way you want them.

      You also may want to reset your ULs and LIs, using something like this:

      nav ul, nav ul li {
      list-style-type:none;
      margin:0;
      padding:0;
      }

      Though an even more generic CSS reset style is even better, although that may break stuff since you developed everything without it so far.

    #102431
    edharrison89
    Member

    Thanks that did the trick! I reset my ULs and LIs in the way you suggested too…

    I’m going to do a bit of research into using a more generic reset style as you probably saw my CSS is a bit of a mess!

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