Reply to Re: How to work around this IE table resizing issue?

Your name:

Reply:


Posted by dorayme on 02/13/07 22:30

In article
<1171397475.393266.205050@k78g2000cwa.googlegroups.com>,
"Bruce C. Miller" <bm3719@gmail.com> wrote:

> Take a look at this html page:
>
> <html>
> <body>
>
> <TABLE border=1 WIDTH="100%">
>
> <TR>
> <TD WIDTH="1">1</TD>
> <TD WIDTH="1">2</TD>
> <TD>333</TD>
> <TD>444</TD>
> </TR>
>
> <TR>
> <TD COLSPAN="4">hhhhhhhhhhhhhhhffffffffffffffffffffffffffhhhhhhh</
> TD>
> </TR>
>
> </TABLE>
> </body>
> </HTML>
>
> If I pull that up in FF it looks like I want it to (the first and
> second columns are small), but in IE it expands those columns (it
> ignores the width=1). How do I tell IE to not automatically make those
> columns whatever size it wants? It seems to have something to do with
> the length of content in the COLSPAN-ed row below it, which is pretty
> stupid.

Have you tried with a doctype,

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

?

And remove width in the <td...>, it is an error. If necessary
specify it in css:

td.tiny {width:1em;}

and class the <td>s concerned. If there is a meaningful reason
apart from the sheer look to so do, then use a more appropriate
name than my "tiny".

And what is this business of "1"? This means 1px in your code.
But that is not very sensible, even one character will take up
more space generally. Poor IE, what is it to do? We all now it is
a bit challenged. Why strain its brain? Better to use ems as
above.

And really, is there a good reason so want to constrain things?
Why not let the widths adjust themselves to the content and the
browser window? Even remove the width="100%".

Play about with these ideas and let us know if IE then behaves
more according to your taste (I have not looked at any of the
Wins IE for a while)

--
dorayme

[Back to original 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

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