Support Forum » CSS

Navbar won't line up right??

(5 posts)
  • Started 2 years ago by irishange1
  • Latest reply from guyleech

  1. irishange1
    Member

    This is my first page using css so bare with me... No matter what I do I can't seem to get my navbar to line up flush with the left side of the page. The page is at: http://www.mittenmountain.com/2008/smithsonianlook.html
    If you need anything else let me know. Also if you happen to notice anything that doesn't look right please let me know... any help is greatly appreciated.

    Thank you, Angela

    Posted: 2 years #
  2. Hi,

    the ul inside the h3 in the navigation on the left has padding on 40px - I'm not sure whether this is something you've added, or a browser default.You can "zero" this with a statement like this

    #links ul {padding-left: 0}

    this adds padding of 0 to ul elements only when they are contained within an element of id "links"

    Does that help?

    thanks

    john

    Posted: 2 years #
  3. irishange1
    Member

    I tried that but it didn't seem to do anything. So I went and did this:

    #navbar {
    margin-left: -2px; ....

    that seemed to put it flush to the left side, at least viewing it from this computer. It doesn't make sense that that should work.. should be 0px. Any advice?

    Posted: 2 years #
  4. Hi,

    what browser is it?

    john

    Posted: 2 years #
  5. Hey,

    The issue is occurring because there is a 2px border on your #header:

    #header {
    border-left: 2px solid;

    This border is creating the little black strip next to the navigation, so that it isn't flush with the edge. Removing this code makes the navigation line up properly.

    There is also a 2px top border on #header; if you want your header area to be flush with the top of the page, just remove that code.

    I hope that helps,
    Guy

    Posted: 2 years #

RSS feed for this topic

Reply

You must log in to post.

0.056 - 9 queries