On 13/05/2013 12:20 PM, Philippe Wittenbergh wrote:

Le 13 mai 2013 à 11:08, COM <[email protected]> a écrit :

On May 12, 2013, at 7:04 PM, Alan Gresley <[email protected]>

Also,  need to have a top margin value for the header so that I can
position it vertically where I need it to, so am I forced to use
padding for this?

Assuming the <header> is the first child of <body>, you could set
some padding-top on the body element.

The CSS got lost in the first few messages. The header is the child of the wrapper.

#wrapper{
        margin:0 auto;
        width:940px;
        padding:0 20px;
        background-color:rgb(220,230,220);
}
header{
        margin:20px 0 1em 0;
        border:red 1px solid;
}

The vertically spacing can be added by giving the wrapper a margin-top. I should have mentioned this in my initial reply.

#wrapper{
        margin:20px auto 0;
        width:940px;
        padding:0 20px;
        background-color:rgb(220,230,220);
}
header{
        margin:0 0 1em 0;
        border:red 1px solid;
}

Bare in mind though that the margin-top of #wrapper will collapse through the default margin-top (of 8px) of <body>.


..off to read the link you provided

Good. And then create simple test cases to play with. Add a bit of
background colours to the elements in your test cases to see what
goes where. If you don't understand what happens in one (as minimal
as possible) test case, post it somewhere and ask questions to the
list.


Read all the links provided in the thread. You don't necessarily have to learn hasLayout and IE7- since that is from the past.

Like Philippe, I highly recommend creating simple test cases. It a collective of such activity that teaches all.


--
Alan Gresley
http://css-3d.org/
http://css-class.com/
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to