Layout Problem

Discussion in 'CSS' started by whirlybird20, Jul 5, 2008.

  1. #1
    Hi,

    Can anyone tell me what has gon wrong here?

    http://1stclasswebsites.com/test

    I found that setting the h1 top-margin to 0, and the p bottom-margin to 0 sorts it, but I don't want to have to do this.

    Is there another way?

    This is the first time I have tryed making a website without tables.

    Joel
     
    whirlybird20, Jul 5, 2008 IP
  2. Rubenator

    Rubenator Peon

    Messages:
    40
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Add overflow:hidden to #content. It will look like this:

    #content{
    width:800px;
    margin-left:auto;
    margin-right:auto;
    background-image: url(images/background.jpg);
    overflow:hidden;
    }


    It seems to me that you are new to CSS, so I will give another tip; see how you have <div id="header" class="header"> repeating "header" as an id and a class? Well, to put it simple ID is a unique selector and class can be a multiple one. In this case, you can get rid of class in all your divs.

    There's some additional errors but I guess you may want to hit and miss. Keep playing with HTML/CSS, and more importantly, read about it.
     
    Rubenator, Jul 5, 2008 IP
    whirlybird20 likes this.
  3. whirlybird20

    whirlybird20 Guest

    Messages:
    462
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you very much!
     
    whirlybird20, Jul 5, 2008 IP