H
HJ
Hi, I am pretty new in CSS. What I want to do is to have a child div to
cover the parent div, so all the text links (actually anything) in the
parent div are NOT clickable. Basically, the child div needs to have
the same width and height as the parent div.
The following is some sample code:
//*************************************************************
<STYLE type="text/css">
.front {
width:100%;
height:100%;
border:2px solid #00C;
background-color:#C0C0C0;
position:absolute;
</STYLE>
<DIV>
<div class="front"></div>
Some text...
<p><a href="http://www.yahoo.com">Yahoo</a></p>
Some more text...
</DIV>
//*************************************************************
The problem with the code is that, the parent div does not have a
height. So the child div doesn't have a height value to cover the whole
parent div.
The problem I am facing now is that the height of the parent div is
dynamic. The content in the parent div is generated dynamically in for
loop. So I can't define a height for the parent div in the code.
If there is any work around in this, please help me out here...
Thanks a lot.
HJ
cover the parent div, so all the text links (actually anything) in the
parent div are NOT clickable. Basically, the child div needs to have
the same width and height as the parent div.
The following is some sample code:
//*************************************************************
<STYLE type="text/css">
.front {
width:100%;
height:100%;
border:2px solid #00C;
background-color:#C0C0C0;
position:absolute;
</STYLE>
<DIV>
<div class="front"></div>
Some text...
<p><a href="http://www.yahoo.com">Yahoo</a></p>
Some more text...
</DIV>
//*************************************************************
The problem with the code is that, the parent div does not have a
height. So the child div doesn't have a height value to cover the whole
parent div.
The problem I am facing now is that the height of the parent div is
dynamic. The content in the parent div is generated dynamically in for
loop. So I can't define a height for the parent div in the code.
If there is any work around in this, please help me out here...
Thanks a lot.
HJ