M
Malcolm Collett
I am experimenting with divs and CSS with a view to getting rid of tables
for layout. (no URL yet)
I have something like this:
<div style="width:49%; float:left;">
<h6>..H1..</h6>
<p>..P1..</p>
</div>
<div>
<h6>..H2..</h6>
<p>..P2..</p>
</div>
The style sheet contains this:
div {border:1px solid black;}
I expected to get two divs, each div having its own border.
The first div behaves as I expected, with a border around H1 and P1. But the
border for the second div encloses the first div and H2, P2. Why is this?
How do I make the border for second div enclose H2 and P2 only; and not the
first div
Thanks
Malcolm
for layout. (no URL yet)
I have something like this:
<div style="width:49%; float:left;">
<h6>..H1..</h6>
<p>..P1..</p>
</div>
<div>
<h6>..H2..</h6>
<p>..P2..</p>
</div>
The style sheet contains this:
div {border:1px solid black;}
I expected to get two divs, each div having its own border.
The first div behaves as I expected, with a border around H1 and P1. But the
border for the second div encloses the first div and H2, P2. Why is this?
How do I make the border for second div enclose H2 and P2 only; and not the
first div
Thanks
Malcolm