mescalin
asked on
Empty div height
I have following in my css file:
.div343
{
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
background-color: #FFFFFF;
max-width: 545px;
padding: 7px;
}
I have a static content and have this div in so many pages. I want to have it invisible with 0px height if <div> </div> is empty.
Is it possible to solve it directly with css?
.div343
{
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
background-color: #FFFFFF;
max-width: 545px;
padding: 7px;
}
I have a static content and have this div in so many pages. I want to have it invisible with 0px height if <div> </div> is empty.
Is it possible to solve it directly with css?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you need to configure the div with no border, padding or margins,,
and the "div content" must give some formatting attributes like padding.
<div></div>
<div><span class='borders'>your content</span></div>
and the "div content" must give some formatting attributes like padding.
<div></div>
<div><span class='borders'>your content</span></div>
Or you could use Javascript as well. CSS alone won't do it though.