473,386 Members | 1,841 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,386 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 4627
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.