0

Hi all

I have a div in which I've placed some anchor tags with the css property:

display:block;

I've given the div a grey background color and when I view the page on the net the div doesn't surround the anchor tags. The height of the div seems to be the padding, top and bottom, added together.

Any ideas on how I can get the div to inherit the height of the items contained in it?

I've tried:

height:inherit;

AND

height:auto;

Neither of those work.

1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Venom Rush
0

Ok, I seem to have solved my problem by placing a div inside my div at the bottom with the css style:

clear:both;

Seems to work like a charm.

Edited by Venom Rush: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.