S
state.cs
Readers,
I am in the process of learning CSS. I wrote the following CSS and
HTML:
<style type="text/css">
.wrapper {
width:470px; background-color:#000000; color:#FFFFFF;
}
.testing {
margin:5px; background-color:#CCCCCC;
}
</style>
<body style="background-color:#FFFFCC; margin:0; padding:0;">
<div class="wrapper">
<div class="testing">What's up dude?</div>
</div>
IE 5.5, 6 and 7 display a 5px black area all 4 sides of div.testing.
FF 2 and Chrome display 5px black area only on the right and the left,
but nothing on the top and bottom. I would like FF and Chrome to
display a 5px on the top and the bottom as does IE. How can I achieve
that?
Can someone please indicate the reason for such difference between IE
and FF/Chrome and how I can overcome it in future? I have read the box
model and various CSS hacks, but with limited practical knowledge, I
am a little confused.
Thank you.
I am in the process of learning CSS. I wrote the following CSS and
HTML:
<style type="text/css">
.wrapper {
width:470px; background-color:#000000; color:#FFFFFF;
}
.testing {
margin:5px; background-color:#CCCCCC;
}
</style>
<body style="background-color:#FFFFCC; margin:0; padding:0;">
<div class="wrapper">
<div class="testing">What's up dude?</div>
</div>
IE 5.5, 6 and 7 display a 5px black area all 4 sides of div.testing.
FF 2 and Chrome display 5px black area only on the right and the left,
but nothing on the top and bottom. I would like FF and Chrome to
display a 5px on the top and the bottom as does IE. How can I achieve
that?
Can someone please indicate the reason for such difference between IE
and FF/Chrome and how I can overcome it in future? I have read the box
model and various CSS hacks, but with limited practical knowledge, I
am a little confused.
Thank you.