You are here: Re: Maintaining aspect ratio of a table « HTML « IT news, forums, messages
Re: Maintaining aspect ratio of a table

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация