473,321 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 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 4622
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Gregory | last post by:
Hello, I'm trying to do the above in order to process an image and return the result to an html image control. It fails and my key suspects are either the variable that I'm passing in -...
3
by: Luigi Donatello Asero | last post by:
Is an index in a database the equivalent for a <TH scope="col"> in a column of a table in the html code? -- Luigi ( un italiano che vive in Svezia)...
10
by: Blue® | last post by:
I would like to call the content of content.htm (containing only HTML codes) into index.htm. This is usually done by renaming index.htm to index.shtml and use this tag: <!--#include...
2
by: Shaun | last post by:
Hello! I have a quick question regarding CSS and having it applied to all elements. I am trying to eliminate the gap between a paragraph and a list that usually occurs in html and I've found...
15
by: Gérard Talbot | last post by:
Hello all, I'd like to know and understand the difference between, say, <img src="/ImageFilename.png" width="123" height="456" alt=""> and <img src="/ImageFilename.png" style="width:...
17
by: Alan Silver | last post by:
Hello, I have a page which I am converting to use themes. The page has an HTML <input type="image"> element that is used to post to another page. I would like to replace this with a server...
37
by: Jan Wagner | last post by:
Hi, can't figure this one out, what's the CSS way to specify the language? In HTML it would be simply an lang="xx" attribute, or XHTML xml:lang="xx", but, how about in CSS? This would be...
20
by: AndyZa | last post by:
Is the following html valid? <p><hr width="50%"></p> Or would the following be more "technically correct"? <p> <hr width="50%"> Do I require the closing </p> tag?
7
by: Christian Hackl | last post by:
Hi everyone, I've got a question about what makes the "img" element's width/height attributes valid HTML or XHTML. First of all, this is a rather theoretical question, but digging through the...
36
by: Roedy Green | last post by:
The only browser I have encountered that supports <colgroup><col class="behold"></colgroup> to apply a CSS style to a whole column, is Microsoft Internet Explorer. I have been told it SHOULD NOT...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.