Re: Classes don't work in table cells
by Kynn Bartlett <kynn(at)idyllmtn.com>
|
Date: |
Fri, 18 Jan 2002 16:15:25 -0800 |
To: |
Anna Peekstok <apeekstok(at)attbi.com>, <hwg-style(at)hwg.org> |
References: |
attbi |
|
todo: View
Thread,
Original
|
|
At 3:42 PM -0800 1/18/02, Anna Peekstok wrote:
>I'm trying to format a price list using indents within table cells to denote
>subcategories. I created two classes, ".indent1" and ".indent2", which
>should create left-margins of 15px and 30px, respectively. I then applied
>these classes to <td> tags (i.e., <td class="indent1">), hoping to get
>appropriate indents within the table cells.
>
>Unfortunately, I see no indents in Explorer 5 (Mac), Netscape 6 (Mac), or
>Opera (Mac). I've checked my CSS texts and done some searching on the web,
>but found no relevant information. Can anyone tell me what I'm doing wrong?
Check the CSS spec:
<blockquote>
17.5 Visual layout of table contents
Like other elements of the document language, internal table elements
generate rectangular boxes with content, padding, and borders. They
do not have margins, however.
</blockquote>
Solution: use padding instead of margin.
--Kynn
--
Kynn Bartlett <kynn(at)idyllmtn.com> http://kynn.com
Chief Technologist, Idyll Mountain http://idyllmtn.com
Web Accessibility Expert-for-hire http://kynn.com/resume
January Web Accessibility eCourse http://kynn.com/+d201
Forthcoming: Teach Yourself CSS in 24 Hours
HWG hwg-style mailing list archives,
maintained by Webmasters @ IWA