March 6, 2013
CSS child bigger than parent allowed?
Question by Programista
Quick question.
I know i can make child div bigger than parent, but is it allowed by w3c? Is it against some rules? Any performance problems?
Answer by albertxing
There are many cases where you would need an overflow in the parent div
, with a larger child div
: for example, a fixed-position content frame.
And there should be no performance impediment; it should be around the same as rendering the child div
as a sibling of the parent.
Answer by Starx
W3C specifications does not limit you what kind of value you use for its attributes, except for few cases like:
- Integer Id Attribute
So, to answer your question, Yes it is allowed.