hi, I have a small problem with css margins. I have the following html document (simplified for testing purposes)
Code:
<h1 id="contop">start</h1>
<div class="conbg">
<div class="conbg2">
<h1>topic</h1>
<div class="tiny">24.3.2006</div>
<p>test text...</p>
</div>
</div>
<h1 id="conbottom">end</h1>
css is the following:
Code:
h1#contop {
background-image: url('images/contop.jpg');
background-repeat: no-repeat;
width: 525px;
height: 39px;
text-indent: -9999px;
margin: 0px;
}
h1#conbottom {
background-image: url('images/conbottom.jpg');
background-repeat: no-repeat;
width: 525px;
height: 79px;
text-indent: -9999px;
margin: 0px;
}
div.conbg {
background-image: url('images/conbg.jpg');
background-repeat: repeat-y;
}
div.conbg2 {
background-image: url('images/conbg2.jpg');
background-repeat: no-repeat;
padding: 0px 40px 0px 40px;
margin: 0px;
}
And as you can see. If I use margin inside the .conbg2 element it will place the margin between the conbg2 and conbg elements. What am I missing here. I could forget margins and use just paddings but I would like to solve this before I will go there. Any ideas?