Reputation: 705
body
{
width:1024px;
height:600px;
}
#footer
{
margin-top:800px;
}
My question is there a way of setting some property in the parent tag body , to limit the child inside that tag (i dont want footer outside the body box model) only even if we SET HIGHER VALUE than parent tag body.
Upvotes: 0
Views: 87
Reputation: 5620
While you should avoid to set a higher value in a child tag, in case it is, you more likely want to use overflow:hidden;
who basically hides anything that is "out of bound".
See this working FIDDLE for an example.
Upvotes: 1
Reputation:
what you are trying to do is not a good coding practice. in this case you should try limiting the target element from the #footer itself. this might help
Upvotes: 1