- From: Håkon Wium Lie <howcome@operasoftware.com>
- Date: Tue, 13 Jul 1999 17:09:05 +0200 (MET DST)
- To: Saku Ytti <saku@ytti.net>
- Cc: www-style@w3.org
Also sprach Saku Ytti: > If I have margin defined and still would like to use whole available > space in somecases what should I do? > > This didn't work: > .tight { margin-left: 0; margin-right: 0; } > > What I actually need to accomplish is to fit large line from perl script. > And still have normal margin elsewhere. > > It fells silly, but should I just drop the margin from BODY and put it > in UL for example, and when I want 0 margin text just close the UL? You can to that, but it's cumbersome since you need to give all elements a margin. An easier solution is to give your ".tight" elements negative margin values, e.g.: .tight { margin-left: -30px; margin-right: -30px; } Negativ margins should be used with care since there might be implementations-specific limits. Hoever, most browser seem to support them quite graciously. If you use percentage values, be aware that the calcuations will be based on different containing blocks. Em units are safer, px even more so. -h&kon Håkon Wium Lie http://www.operasoftware.com/people/howcome howcome@operasoftware.com gets you there faster
Received on Tuesday, 13 July 1999 11:09:38 UTC