Reputation: 3
I may have asked this question in a confusing way.
Basically I need this: http://www.jayflood.com/layout.jpg
I'm sure there are a ton of ways to do this, but my problem lies in working within a preexisting structure. The parent container does not have a set width, but does have 40px of padding.
I need the content div to be considered width 100% so I can properly divide up the divs within.
The question is basically - Is it possible to have a smaller containing div have a 100% width.
Upvotes: 0
Views: 99
Reputation: 368
subtract the padding using a negative margin so if the parent has 40px padding then set the child to have -40px margin ex.
#parent{
padding: 40px;
}
and
#child{
width: 100%;
margin: -40px;
}
Upvotes: 0