Absolute position and floating
- by Ruth Rettigo
Hi,
Do you have any idea, how to style this layout without specifing exact height for "Element 1"?
Code
Element1
{
positon: relative;
width: 100%;
height: auto; /* I don't want to specify exact height */
}
Inner1
{
position: absolute;
top: xyz px;
left: xyz px;
}
Inner2
{
position: absolute;
top: xyz px;
left: xyz px;
}
Element2
{
float: left;
width: 100%;
}
Example
+--------------------------------------------------+
|Element1 |
| +--------+ |
| +--------+ |Inner2 | |
| |Inner1 | +--------+ |
| +--------+ |
| |
| |
+--------------------------------------------------+
+--------------------------------------------------+
|Element2 |
| |
| |
+--------------------------------------------------+