l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2006 Dec 17 13:41

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Fwd: css: cell width and height
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Fwd: css: cell width and height

On Sat, Dec 16, 2006 at 12:27:25PM -0800, Joshua Morris wrote:
[snipped: question about creating HTML table cell with specific size]
>    I would give the td sections an id to separate them from the other td tags
>    such as
>    <table>
>         <td>foo</td>
>         <td id="special">bar</td>
>    then in you css you would have
>    table {height: 1px; width: 2px;}
>    #special {height: 3em; width: 2em;}

In addition to setting the height and width of the <td> tag, I think
there's also the issues of margins, borders, and padding, all of which
contribute to the cell "size", depending on what one means by "size".

The definition of "size" is also in question.  Do you want to set the
cell's size to be 3emx2em *with* the border or *without*?  Does 3emx2em
include or exclude the margin around the cell?  What about the padding
inside the cell?  Unfortunately the answers to these questions depend
from browser to browser and version to version, in big part because of
IE's incorrect implementation of the CSS standard in its old
implementation.  The newer versions of IE handle it properly if you set
the doctype of the HTML document to XHTML 1.0 or newer, as I recall.

Also, there is also the issue of how the cell should handle cases when
the object inside the cell is too big to be fit in the specified cell
size.  What happens if the object inside the cell is 5emx5em?  Should
the cell expand automatically?  Clip it?  Let the object extend outside
the cell but keep the cell size the same, making the object look like
it's just overlaying on top of the cell?  You can control this setting,
too, using the "overflow" parameter.  How well this parameter is
supported, too, depends on the browser, apparently because it's sort of
hard to implement properly, and as I recall some browsers still don't
implement them properly even in their latest version.


vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.