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

Weird IE bug? float:left in <td> together with (any) inline styles?

P: n/a
Hi,

The HTML at the end of this message will render erroneously on IE (at
least 5.0) and prperly on Mozilla (as I've been told). That does not
surprise me, but I *would* like to find some workaround to get it to
display properly...

The thing is: on IE5 (Windows) the second "hello" is just not rendered
(ok, at least I try to select all text with Ctrl-A...) when the empty
<style> element is in the document. If I remove that element, it renders
OK.

Is this a known bug, and if so, is there a workaround?

(I need the "width" on the floating label as I'm trying to reproduce
some specific lists as they are now marked-up in a PDF-file)

Regards,

Herman

================

<html>
<head>
<style type="text/css">
</style>
</head>
<body>

<table>
<tr><td>
<div style="float:left">hello</div>
<div style="margin-left: 1cm">world</div>
</td></tr>
</table>

<table>
<tr><td>
<div style="float:left; width: 0.95cm;">hello</div>
<div style="margin-left: 1cm">world</div>
</td></tr>
</table>

<div style="float:left; width: 0.95cm;">hello</div>
<div style="margin-left: 1cm">world</div>

</body>
</html>

Jul 20 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Els
Herman Kuiper wrote:
Hi,

The HTML at the end of this message will render erroneously on IE (at
least 5.0) and prperly on Mozilla (as I've been told). That does not
surprise me, but I *would* like to find some workaround to get it to
display properly...

The thing is: on IE5 (Windows) the second "hello" is just not rendered
(ok, at least I try to select all text with Ctrl-A...) when the empty
<style> element is in the document. If I remove that element, it renders
OK.

Is this a known bug, and if so, is there a workaround?


I just copy-pasted your code, and it renders 'hello world'
three times, both in IE5.01 and IE5.5 (and NS7.1 ;-) )
--
Els

Sonhos vem. Sonhos vo. O resto imperfeito.
- Renato Russo -

Jul 20 '05 #2

P: n/a
In article <40**********************@dreader2.news.tiscali.nl >,
el*********@tiscali.nl says...
I just copy-pasted your code, and it renders 'hello world'
three times, both in IE5.01 and IE5.5 (and NS7.1 ;-) )


Harumph... It *was* late last night, but it didn't work over here.
Honest. I tried again, and found that (first closing all browser
windows, just in case) that the initial view was correct, but that an F5
(reload) would render the document erroneously. Using IE5.00.3502.1000
BTW.

Herman
Jul 20 '05 #3

P: n/a
Els


Herman Kuiper wrote:
In article <40**********************@dreader2.news.tiscali.nl >,
el*********@tiscali.nl says...

I just copy-pasted your code, and it renders 'hello world'
three times, both in IE5.01 and IE5.5 (and NS7.1 ;-) )

Harumph... It *was* late last night, but it didn't work over here.
Honest. I tried again, and found that (first closing all browser
windows, just in case) that the initial view was correct, but that an F5
(reload) would render the document erroneously. Using IE5.00.3502.1000
BTW.


Yep, I see it now too, after reloading the page...
Don't know why, might have to do with the 'peek-a-boo' bug,
but I'm not sure, cause that one usually says 'peek-a-boo'
after you cover it with another window and uncover it. This
one doesn't.

Tried quite a few things too, but as soon as the width
property is given to the float (which is usually necessary),
the height collapses. So I gave it height, and it has
height, but still, the word doesn't appear....

Looks like a bug indeed :-(

Works in 5.5 though, just not in 5.0 or 5.01...

--
Els

Sonhos vem. Sonhos vo. O resto imperfeito.
- Renato Russo -

Jul 20 '05 #4

P: n/a
In article <40**********************@dreader2.news.tiscali.nl >,
el*********@tiscali.nl says...
Yep, I see it now too, after reloading the page...
Tried quite a few things too, but as soon as the width
property is given to the float (which is usually necessary),
the height collapses. So I gave it height, and it has
height, but still, the word doesn't appear....
:-) Whenit has a height, and you just single-click on it, it will
usually appear as well. But what bugs me most is that (at least over
here), the presence of the <style> tag is also related to the problem,
even though it utterly empty...
Works in 5.5 though, just not in 5.0 or 5.01...


OK - the site is for a specific set of users, and most of them have
IE5.5 or IE6. With this, in a few documents the word "Tip" (used as a
list identifier) is missing, not a huge problem.

Herman
Jul 20 '05 #5

P: n/a
Els
Herman Kuiper wrote:
:-) Whenit has a height, and you just single-click on it, it will
usually appear as well. But what bugs me most is that (at least over
here), the presence of the <style> tag is also related to the problem,
even though it utterly empty...


So why don't you take tose tags out and <link> to a seperate
stylesheet? If the bug isn't triggered that way, why not?
--
Els

Sonhos vem. Sonhos vo. O resto imperfeito.
- Renato Russo -

Jul 20 '05 #6

P: n/a
In article <40**********************@dreader2.news.tiscali.nl >,
el*********@tiscali.nl says...
Herman Kuiper wrote:
:-) Whenit has a height, and you just single-click on it, it will
usually appear as well. But what bugs me most is that (at least over
here), the presence of the <style> tag is also related to the problem,
even though it utterly empty...


So why don't you take tose tags out and <link> to a seperate
stylesheet? If the bug isn't triggered that way, why not?


Might be an idea, but in that case I would need a CSS file per HTML
file, as the HTML files are generated from XML, and in each, formatting
of the same type of items is slightly different (it is a conversion job
from Quark Xpress -> HTML/PDF, and for this first run, the customer want
documents which look exactly the same as wha they had; for a next run we
probably can talk about having consistent formatting across documents
;-).

Now we have one globals CSS file and each document contains its own
overrides.

Thank for the 'peek-a-boo' reference - didn't know that one and some
Googling lead me to a reference to the 3px bug with floats, smething I
had seen and was wondering about how *that* came about in my output :-)

Herman
Jul 20 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.