[thelist] Percentage width v/s pixel paddings, margins and borders

Joshua Olson joshua at waetech.com
Sun Feb 29 17:56:14 CST 2004


> -----Original Message-----
> From: Alvaro Medina
> Sent: Sunday, February 29, 2004 2:44 PM
>
>
> Hello folks, have a lil CSS question : when working with
> percentage (%) widths (or heights) , and with pixel paddings and
> margins, can the width in % be tweaked to be x% minus the
> paddings and margins? can it be done something like "width :
> 100%-20px" or something?

Alvaro,

Sadly (and I mean that honestly), no.  The best resort (and I think of it as
a hack) is to use two embedded divs... one to set the width, the other to
set the border, margin, and padding.

Best of luck,

<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com/service_areas/
706.210.0168




More information about the thelist mailing list