472,119 Members | 2,043 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

Is <col width="0*"> known to work on any non-Mozilla browsers

By my reading of the HTML standard:

http://www.w3.org/TR/REC-html40/struct/tables.html

the HTML shown below should display the text "Enter password" with the
input field immediately adjacent, since the first column uses the "0*"
proportional width attribute to request minimum column width.

This example works perfectly if viewed with Mozilla/Firefox, but under
Internet Explorer, Safari, and Opera it displays with lots of
whitespace between the labels and the text fields. Does anyone have an
idea why?

Has anyone successfully used the "0*" proportional column width
attribute with non-Mozilla browsers? Is there anything incorrect about
the HTML?

If anyone wants to try this experiment with various browsers, the HTML
example is on my web site at:

http://eleven.sourceforge.net/eleven-bugs/example3.html

Here's the HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<body>
<table width="100%">
<colgroup><col width="0*"><col width="1*">
<tr>
<td nowrap>Enter password:</td>
<td><input type="text" name="password1" value=""></td>
</tr>
<tr>
<td nowrap>Enter password (verify):</td>
<td><input type="text" name="password2" value=""></td>
</tr>
</table>
</body>
</html>

Many thanks for any ideas.

--
Joe Morrison Eleven. One louder.
http://www.powerframe.com http://eleven.sourceforge.net
Jul 23 '05 #1
6 4572
Once upon a time *Joe Morrison* wrote:
By my reading of the HTML standard:

http://www.w3.org/TR/REC-html40/struct/tables.html

the HTML shown below should display the text "Enter password" with the
input field immediately adjacent, since the first column uses the "0*"
proportional width attribute to request minimum column width.

This example works perfectly if viewed with Mozilla/Firefox, but under
Internet Explorer, Safari, and Opera it displays with lots of
whitespace between the labels and the text fields. Does anyone have an
idea why?

Has anyone successfully used the "0*" proportional column width
attribute with non-Mozilla browsers? Is there anything incorrect about
the HTML?

If anyone wants to try this experiment with various browsers, the HTML
example is on my web site at:

http://eleven.sourceforge.net/eleven-bugs/example3.html

Here's the HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<body>
<table width="100%">
<colgroup><col width="0*"><col width="1*">
<tr>
<td nowrap>Enter password:</td>
<td><input type="text" name="password1" value=""></td>
</tr>
<tr>
<td nowrap>Enter password (verify):</td>
<td><input type="text" name="password2" value=""></td>
</tr>
</table>
</body>
</html>

Many thanks for any ideas.


I hope I can explain this properly even if my native language is not
english :-)

Have you tried to nest the table inside an "parent" table with a width
set to "1*" for the "parent"? It may not be a beatyful sulotion but it
worked for me to get similar looks in both Mozilla and IE.

BTW, "nowrap" is not valid in "Strict" DTD. Use CSS for that, or change
to Transitional DTD

--
/Arne
Jul 23 '05 #2
Joe Morrison wrote;
By my reading of the HTML standard:

http://www.w3.org/TR/REC-html40/struct/tables.html

the HTML shown below should display the text "Enter password" with the
input field immediately adjacent, since the first column uses the "0*"
proportional width attribute to request minimum column width.

This example works perfectly if viewed with Mozilla/Firefox, but under
Internet Explorer, Safari, and Opera it displays with lots of
whitespace between the labels and the text fields. Does anyone have an
idea why?

Has anyone successfully used the "0*" proportional column width
attribute with non-Mozilla browsers? Is there anything incorrect about
the HTML? http://eleven.sourceforge.net/eleven-bugs/example3.html


Doesn't work on Opera 7.6p1
This should cause same in all supporting browsers:
td:first-child {width:1px;}
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Jul 23 '05 #3
Lauri Raittila wrote:
[snip]

Doesn't work on Opera 7.6p1
This should cause same in all supporting browsers:
td:first-child {width:1px;}


Or make the first column 1px, I can't see there's much point in using a
proportional width spec when you don't want a proportional result (it
doesn't seem to work at all in Safari 1.0.3).

<colgroup><col width="1"><col width="1*"></colgroup>

You can avoid "nowrap" by using &nbsp; for the spaces.

<td>Enter&nbsp;password&nbsp;(verify):</td>
Cheers, Fred.
Jul 23 '05 #4
Fred Oz wrote:
You can avoid "nowrap" by using &nbsp; for the spaces.
<td>Enter&nbsp;password&nbsp;(verify):</td>


That stops wrapping on spaces, but doesn't prevent the browser from
wrapping, for instance, long-hyphenated-words.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Jul 23 '05 #5
Fred Oz wrote;
Lauri Raittila wrote:
[snip]

Doesn't work on Opera 7.6p1
This should cause same in all supporting browsers:
td:first-child {width:1px;}
Or make the first column 1px,


That would be bug, unless cell is empty. Of course, selector needs to
match.
I can't see there's much point in using a
proportional width spec when you don't want a proportional result (it
doesn't seem to work at all in Safari 1.0.3).
Maybe you have not read the spec. 0* is defined as spesial case in
HTML spec.
You can avoid "nowrap" by using &nbsp; for the spaces.

<td>Enter&nbsp;password&nbsp;(verify):</td>


That would be ugly. nowrap is much better. Can be done using css too.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Jul 23 '05 #6
Lauri Raittila wrote:
Joe Morrison wrote;
By my reading of the HTML standard:

http://www.w3.org/TR/REC-html40/struct/tables.html

the HTML shown below should display the text "Enter password" with
the input field immediately adjacent, since the first column uses
the "0*" proportional width attribute to request minimum column
width.

This example works perfectly if viewed with Mozilla/Firefox, but
under Internet Explorer, Safari, and Opera it displays with lots of
whitespace between the labels and the text fields. Does anyone have
an idea why?

Has anyone successfully used the "0*" proportional column width
attribute with non-Mozilla browsers? Is there anything incorrect
about the HTML?

http://eleven.sourceforge.net/eleven-bugs/example3.html


Doesn't work on Opera 7.6p1


Opera doesn't seem to support col very well. See eg.
http://groups.google.com/groups?hl=e...com%26rnum%3D1

Boris
Jul 23 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Luigi Donatello Asero | last post: by
37 posts views Thread by Jan Wagner | last post: by
20 posts views Thread by AndyZa | last post: by
7 posts views Thread by Christian Hackl | last post: by
36 posts views Thread by Roedy Green | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.