You are here: Re: html table cols mix % with pixels « HTML « IT news, forums, messages
Re: html table cols mix % with pixels

Posted by Ben C on 03/06/07 12:27

On 2007-03-06, ptdorf@gmail.com <ptdorf@gmail.com> wrote:
> can anyone tell me how can i control the table columns width both in
> pixels and %?

You can mix them up all you like, e.g.

<tr>
<td style="width: 200px">...</td>
<td>another cell</td>
</tr>
<tr>
<td style="width: 50%">...</td>
<td>another cell</td>
</tr>

and the browser will bend over backwards to try to make as much as what
you've asked for as close to true as possible, even where it's self
contradictory.

You can't set percentage and pixel width at the same time on the same
_cell_, but you can do that on two cells in the same column, which is
effectively asking both for a width and a percentage width on that
column.

For example in this case, the browser might stretch the second
auto-width column to make 200px and 50% both true, provided there's
400px available.

I would say though it's better not to rely on this kind of thing. If
it's specified, I don't know where, and you can expect to find
differences between browsers. Simple is best.

 

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

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