![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have the following markup. The problem is that the browser, e.g., IE6, inserts several lines of blank space between the <div> and the following table. |
|
tr> <td width="696"> ul |
#3
| |||
| |||
|
|
On the other hand, you are using a single-cell table for the sole purpose of setting the maximal column width to 696 pixels. The markup could thus be simplified if you do such things in CSS. However, the table trick actually works better on present-day browsers, especially since IE 6 does not support the max-width property. |
#4
| |||
| |||
|
|
"Jukka K. Korpela" <jkorpela (AT) cs (DOT) tut.fi> wrote: On the other hand, you are using a single-cell table for the sole purpose of setting the maximal column width to 696 pixels. The markup could thus be simplified if you do such things in CSS. However, the table trick actually works better on present-day browsers, especially since IE 6 does not support the max-width property. Hack available though: http://www.svendtofte.com/code/max_width_in_ie/ |
#5
| ||||
| ||||
|
|
Hack available though: http://www.svendtofte.com/code/max_width_in_ie/ I would prefer the HTML table hack to the trickery suggested there - the page is far from convincing; it even propagates misconceptions like "em specifies the width of the capital M". |
|
And it plays some odd game that ultimately boils down to _assuming_ some particular relationship between points and pixels. |
|
Note that the single-cell table hack, in addition to not violating HTML specifications (the CSS trickery violates CSS specifications) |
|
, is flexible in the sense that you can set a maximum width in pixels for non- CSS browsing situations and a maximum width in em units in CSS: td width="350" style="width: 22em" |
#6
| ||||||
| ||||||
|
|
I see no relation between the fact that he's wrong on the em issue and the essence of the hack |
|
And it plays some odd game that ultimately boils down to _assuming_ some particular relationship between points and pixels. Not if you use the pixel example (bottom of page), which I assume you would do because the OP's table width was also expressed as a pixel value. |
|
Note that the single-cell table hack, in addition to not violating HTML specifications (the CSS trickery violates CSS specifications) Correct HTML is more important than valid HTML, and the table hack is incorrect HTML. |
|
If there is such a thing as valid CSS, it has little relevance. |
|
I consider ignoring unknown CSS code as is required by the spec as a feature that can be used if needed. |
|
td width="350" style="width: 22em" There's nothing structural about the width expressed in HTML here, thus it should be expressed exclusively in CSS. |
#7
| |||
| |||
|
|
I consider ignoring unknown CSS code as is required by the spec as a feature that can be used if needed. |
#8
| |||
| |||
|
|
On Sat, 31 Jul 2004 09:04:20 +0100, Spartanicus <me (AT) privacy (DOT) net> wrote: [...] I consider ignoring unknown CSS code as is required by the spec as a feature that can be used if needed. The history of the www is filled with individuals who decided that their own interpretation of a "decision in consensus" is more correct than what others did agree upon. |
#9
| |||
| |||
|
|
I have an extra reason for not using a table, as I'd like some small floating sidebars to float clear of the text if window-width permits, or "embed" into the text if it doesn't. |
|
How (un)acceptable would people consider this IE mangled-css if it were enclosed within an IE conditional comment? |
#10
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |