[thelist] CSS padding with 100% width?

Tony Crockford tonyc at boldfish.co.uk
Fri Jan 14 04:10:07 CST 2005


At 09:54 on Friday, 14 Jan 2005, Dmitry Yeskin wrote:

> Hello, guys!
>
> Can anybody help me with CSS?
>
> I have a problem:
> when I have div in other div and that div in other and every divs has a
> padding and width 100% it showing incorrect in all browsers except IE.

>
> How anyone solve this problem?


instead of using padding on the container, apply a margin to the elements  
contained inside.

e.g

instead of using padding:

<div id ="content">
<p>some texthere</p>
</div>


with

#content {
	padding: 10px;
}


use:

#content p{
	margin: 10px;
}


hth

;o)




More information about the thelist mailing list