My dilemma involves a parent element and a child element set up in the following manner:
<parent element>
<...>
<...>
<child element></child element>
</...>
<...>
</parent element>
The challenge I face is how to make the child element inherit half of the width of its parent.
I am pondering, would it be possible in CSS3 to do something like this:
child{
width:parent().parent().parent().width/2 + "px"
}
Unfortunately, using jQuery or adding extra code to the HTML are not options available to me. My only access is to the CSS file. Is there a solution to achieve this?