[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mozilla-layout
Subject:    Re: CSS + Math?
From:       "Garth Wallace" <gwalla () __planetall ! com>
Date:       2000-06-26 5:11:28
[Download RAW message or body]

"Marshall" <neil.marshall@sympatico.ca> wrote in message
news:3956BD71.E70AD520@sympatico.ca...
> Is it possible to mix CSS with math?

No. CSS has no way of doing calculations. It's
strictly declaration-only.

The relevant part of the CSS1 spec is the "units"
section: http://www.w3.org/TR/REC-CSS1#units
CSS2 adds some types, but otherwise doesn't
change much: http://www.w3.org/TR/REC-CSS2/syndata.html#values
God only knows what CSS3 will throw into the
mix, but it's not like that really matters right now
anyway.

> #mydiv { width: 100% - 80px; /* to leave room for a bar on the side */ }
>
> Is that possible?  I haven't been able to find any information on
> this/get any results in my tests.

If I understand you, you want to have an 80px bar
along the side, correct? Setting aside for the moment
the fact that pixel units play hell with different screen
resolutions, the best way of achieving this is to set
the width of #mydiv to auto and setting the width of
#mybar (or whatever) to 80px. This ought to do the
trick.

Setting followups to n.p.m.style, because that's really
where this belongs (layout is more rendering-oriented)
news://news.mozilla.org/netscape.public.mozilla.style

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic