Search code examples
csshtmlcss-tableslayer

Expand the first layer/table in CSS


I want the first layer to expand to the whole screen when I apply my CSS properties. There are margins, left and right of the page.

What I want is similar to this. The first layer is that one in black color.

How can I expand mine to the whole screen, then organize the content inside the remaining part?

Here is the CSS I have just proposed with my first layer:

#main{  
    margin-top:0px;
    width: 100%;
    height: 600px;
    background-color: blue;
}

Solution

  • You have to be more specific, a layer and a table are two very different things. Also, the BBC site you referenced as well as most new websites use <div> tags to organize their html rather than tables. If you could be more specific with some HTML examples you would get a lot more help.

    If you have a heading <div> that has similar styling to the css you posted, then have a content wrapper <div> that you could set the width on it should do what you wanted.

    Again, if you can be more specific, we can give more specific help.