|
Posted by Jukka K. Korpela on 03/28/07 07:26
Scripsit Cogito:
> I've constructed a table to look like a chessboard.
And what's the URL? The way in which you have written the table is more than
all-important.
> The problem is
> that when it is displayed on different screens or when the window is
> resized, the table and squares no longer look like squares.
You did something wrong. (To get a more specific solution, specify a more
specific problem, with a URL.)
> Is there a way to define a table that will maintain a square aspect
> ratio as the screen is resized?
I'm afraid not, except by assigning explicit widths and heights for the
cells, e.g. td { height: 1em; width: 1em; }. Additional rules may be needed
if there is a real risk of content overflow in cells.
You can make the width of a cell a percentage of available width, but
there's no way (except client-side scripting) to make the height the same as
the width then.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Navigation:
[Reply to this message]
|