Reputation: 305
I have a problem with the folowing code
header {
Position : absolute;
Display: inline-block;
Width: 15%;
Height: 100%;
Left: 0;
Top: 0;
}
.headerchild {
Display: block;
Width: 100%;
Padding-bottom: 20%;
Float: left;
}
Headerchildchildeader {
Position : absolute;
Display: inline-block;
Width: 80%;
Height: 100%;
Left: 20%;
}
The problem is that my headerchildchild calculate the height from its parent parent header and not from its parent headerchild
Upvotes: 0
Views: 23
Reputation: 5566
I think I got what you want.
All you have to do is add position property in headerchild child class, .i.e.,
.headerchild {
position: relative; //newly added property
Display: block;
Width: 100%;
Padding-bottom: 20%;
Float: left;
}
Upvotes: 1