By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,938 Members | 2,357 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,938 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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.