View Full Version : Help With Window In Com Design


bryan831
04-16-2006, 02:06 PM
i am trying to make a blog such that the body of the blog is inside a picture of a laptop. currently, i have "succeeded", but i have yet to solve this last problem which would make it even better.

now, everything fits into the laptop screen perfectly, with overflow set to auto, and padding to 0. if i want padding, i set it to 6, for example, but then, it overflows out of the "screen" of the laptop background. how do i have padding, yet no overflow?

bejayel
04-16-2006, 08:38 PM
it does this, even with a width specified??? Are you messing something up in your code by any chance??

J to the izzosh
04-17-2006, 03:21 AM
Try reducing the dimensions of the element that comprises your laptop screen by the amount of padding you've added. For instance, if you add 10 pixels of padding to all sides, reduce the width and height of your element by 20 pixels. You wouldn't think that padding would add to the element's dimensions, but it's just the way that the CSS box model (http://www.w3.org/TR/REC-CSS2/box.html) works. Width and height specify the dimensions of the content, while setting values for padding, margin, border, etc. define the dimensions of areas around the content, so if you add padding, it adds to the overall width of the element, not pushes content away from the inside of the element.