How does one reference <div> parameters?
Posted: Sat Dec 12, 2009 9:55 pm
We have a web page with a floating sidebar and floating body. Is there a way in the body section to reference and use the height of the sidebar? Here is the sidebar definition:
.twoColLiqLtHdr #sidebar1 {
float: left;
width: 24%; /* top and bottom padding create visual space within this div */
background-image: url(images/red1%20background.jpg);
padding-top: 0px;
padding-right: 0;
padding-bottom: 0px;
padding-left: 0px;
}
.twoColLiqLtHdr #sidebar1 h3, .twoColLiqLtHdr #sidebar1 p {
margin-left: 0px; /* the left and right margin should be given to every element that will be placed in the side columns */
margin-right: 0px;
float: none;
background-image: none;
}
.twoColLiqLtHdr #container #sidebar1 {
color: #FFF;
height: 1000px;
font-size: large;
font-family: "Times New Roman", Times, serif;
font-weight: normal;
}
Here is the instantiation of the sidebar:
<div id="sidebar1">
.....
</div>
What I would like to be to do is something like:
.twoColLiqLtHdr #mainContent {
height: "sidebar1"->height;
........
}
Is it possible to do a reference like this and if so, how do you do it?
.twoColLiqLtHdr #sidebar1 {
float: left;
width: 24%; /* top and bottom padding create visual space within this div */
background-image: url(images/red1%20background.jpg);
padding-top: 0px;
padding-right: 0;
padding-bottom: 0px;
padding-left: 0px;
}
.twoColLiqLtHdr #sidebar1 h3, .twoColLiqLtHdr #sidebar1 p {
margin-left: 0px; /* the left and right margin should be given to every element that will be placed in the side columns */
margin-right: 0px;
float: none;
background-image: none;
}
.twoColLiqLtHdr #container #sidebar1 {
color: #FFF;
height: 1000px;
font-size: large;
font-family: "Times New Roman", Times, serif;
font-weight: normal;
}
Here is the instantiation of the sidebar:
<div id="sidebar1">
.....
</div>
What I would like to be to do is something like:
.twoColLiqLtHdr #mainContent {
height: "sidebar1"->height;
........
}
Is it possible to do a reference like this and if so, how do you do it?