I am asking this because I saw very similar question to mine here. having
<div id="grand">
<ul id="parent">
<li class="child">Content</li>
<li class="child">Content</li>
<li class="child">Content</li>
<li class="child">Content</li>
<li class="child">Content</li>
<li class="child">Content</li>
</ul>
</div>
Can one set css width of child
relative ( in % unit ) to that of grand
, completely ignoring value of parent's width. for example:
#child{ width: 25% of grand's width }
Some explanations added:
Consider this:
parent
has 6 child
s in it and we want to show just 4 of theme so that they should have 25% of grand
's width.
#grand{
width: 900px;
overflow: hidden
}
#parent{
width: 9999px;
}
.child{
width: 900px;
width: 25% of grand's width
}