stevenmw

02-01-2012, 03:42 PM

I'm building an entirely CSS oriented layout.

I want to use perentages for my div widths so the width appears the same on all systems.

Obviously if I have a div that is 75%, and I put a div inside that div.. The percentage will refer to the 75%.

So for example if I have a div named #75 and it's width is 75% and I put another div named #100 inside of #75, and I gave #100 a 100% width it would be 100% of #75. Causing #100 to be 75% of the page as well.

What I'm trying to learn is what math do I need to do when adding paddings.

Let's say I have the same divs. (#75 and #100) #75 has a width of 75%. If I give #100 a padding of three pixels how would I know what width to give #100?

Can anyone point me to some excellent tutorials explaining percentages?

Any help would be much appreciated. Thanks.

I want to use perentages for my div widths so the width appears the same on all systems.

Obviously if I have a div that is 75%, and I put a div inside that div.. The percentage will refer to the 75%.

So for example if I have a div named #75 and it's width is 75% and I put another div named #100 inside of #75, and I gave #100 a 100% width it would be 100% of #75. Causing #100 to be 75% of the page as well.

What I'm trying to learn is what math do I need to do when adding paddings.

Let's say I have the same divs. (#75 and #100) #75 has a width of 75%. If I give #100 a padding of three pixels how would I know what width to give #100?

Can anyone point me to some excellent tutorials explaining percentages?

Any help would be much appreciated. Thanks.