IE7 - annoying and unexplainable horzontal scroll

A

Andrey Tarasevich

Hello

The following HTML code makes IE7 to display the horizontal scroll bar
and permit a rather large amount of horizontal scrolling

====
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html>
<body style="font-style: italic">
<table style="width: 100%"><tr><td>
<div style="float: left">Prev</div>
<div style="position: relative; float: right">Next</div>
</td></tr></table>
</body>
</html>
====

see http://home.comcast.net/~andrey-t/test.html

The interesting part is that this behavior critically depends on the
font style being 'italic' (???) and the position of the right-floated
'div' being 'relative'. Changing to non-italic font style disables
scrolling. Same with position. Can anyone please offer any suggestions
as for why exactly the original version causes scrolling in IE?

BTW, a version with 'div' instead of a 'table' produces essentially the
same result

====
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html>
<body style="font-style: italic">
<div style="width:100%">
<div style="float: left">Prev</div>
<div style="position: relative; float: right">Next</div>
</div>
</body>
</html>
====

see http://home.comcast.net/~andrey-t/test_div.html
 
J

Jon Slaughter

Andrey Tarasevich said:
Hello

The following HTML code makes IE7 to display the horizontal scroll bar and
permit a rather large amount of horizontal scrolling

====
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html>
<body style="font-style: italic">
<table style="width: 100%"><tr><td>
<div style="float: left">Prev</div>
<div style="position: relative; float: right">Next</div>
</td></tr></table>
</body>
</html>
====

see http://home.comcast.net/~andrey-t/test.html

The interesting part is that this behavior critically depends on the font
style being 'italic' (???) and the position of the right-floated 'div'
being 'relative'. Changing to non-italic font style disables scrolling.
Same with position. Can anyone please offer any suggestions as for why
exactly the original version causes scrolling in IE?

BTW, a version with 'div' instead of a 'table' produces essentially the
same result

Its IE... did you expect more?
 
J

Jonathan N. Little

Andrey said:
Hello

The following HTML code makes IE7 to display the horizontal scroll bar
and permit a rather large amount of horizontal scrolling
<snip>

IE has a bug associated with italic fonts in calculating the width,
especially next to floated blocks. You are lucky that is only produces a
scroll bar, a typical result is similar to the peek-a-boo bug and the
text simply disappears! As a side note, italic fonts are harder to read,
and best to limit their use. I would not use them for any significant
amount of text but rather as a couple of words emphasis.
 
A

Andrey Tarasevich

Jonathan said:
...
IE has a bug associated with italic fonts in calculating the width,
especially next to floated blocks. You are lucky that is only produces a
scroll bar, a typical result is similar to the peek-a-boo bug and the
text simply disappears! As a side note, italic fonts are harder to read,
and best to limit their use. I would not use them for any significant
amount of text but rather as a couple of words emphasis.
...

Well, in my case I only used italics for a secondary and rather non-intrusive
navigation link. I liked the way it looked and it worked in IE6. Now I get this
stupid scroll bar in IE7. I wonder why it only happens in combination with
'position: relative'. But of course bugs don't have to follow any logic...

Is there a general workaround for IE7 italic font bug?
 
A

Andrey Tarasevich

Andrey said:
...
I wonder why it only happens in combination with
'position: relative'. But of course bugs don't have to follow any logic...
...

I just noticed that when I use a 'div' as a wrapper instead of a 'table' , the
bug occurs regardless of the 'position' property. Indeed, this problem is caused
by italics only.
 
J

Jonathan N. Little

Andrey said:
I just noticed that when I use a 'div' as a wrapper instead of a 'table' , the
bug occurs regardless of the 'position' property. Indeed, this problem is caused
by italics only.
Yep. That is what I discovered, I don't have IE7, running W2K so my
solution was to style EM as bold instead of italic. Not what I preferred
but I needed to get the job done!

(In my dreams Big Bill and Mr Steve are roasting on a spit!) ;-)
 
A

Andrey Tarasevich

Jonathan said:
Yep. That is what I discovered, I don't have IE7, running W2K so my
solution was to style EM as bold instead of italic. Not what I preferred
but I needed to get the job done!
...

Turns out there's a workaround. One of the parent enclosing elements needs to
have its 'overflow' style set to something other than the default 'visible'. In
my case 'overflow: hidden' makes most sense and it fixes the problem.
 
D

dorayme

Andrey Tarasevich said:
But of course bugs don't have to follow any logic...

This is a tricky question. At the level of computer programming
and unexpected side effects on the machine, there is very likely
a logic in the sense of a deterministic algorithm: sets of
circumstances, which if repeated, will trigger the effect. The
bug label is due to its unwanted effect and often to its hidden
causal paths.

It is not out of the question that some things happen as
surprising unintended effects in other than this algorithmic way,
as an instability that is sensitive to all sorts of dynamical
processes, so special appearing, that it falls outside the usual
deterministic causal chains that earthlings understand.
 
B

Ben C

This is a tricky question. At the level of computer programming
and unexpected side effects on the machine, there is very likely
a logic in the sense of a deterministic algorithm: sets of
circumstances, which if repeated, will trigger the effect. The
bug label is due to its unwanted effect and often to its hidden
causal paths.

It is not out of the question that some things happen as
surprising unintended effects in other than this algorithmic way,
as an instability that is sensitive to all sorts of dynamical
processes, so special appearing, that it falls outside the usual
deterministic causal chains that earthlings understand.

That's true, but the distinction is usually between a bug and a
non-conformance. IE taking width to mean outer margin width (or whatever
it does take it to mean) is often called a bug even though it's
obviously intentional. There is still some logic to it, it's just not
what the spec says.

Usually you just call it a bug if it's something that ought to get
fixed, whether it's a correct implementation of the wrong thing or a
wrong attempt at the right thing.
 
J

Jonathan N. Little

dorayme said:
Mr Steve? You saying something about Macs?
New CEO and old buddy of Bill, Steve Ballmer. You know the guy that
looks like Peter Boyle in "Young Frankenstein"
 
D

dorayme

Ben C said:
That's true, but the distinction is usually between a bug and a
non-conformance. IE taking width to mean outer margin width (or whatever
it does take it to mean) is often called a bug even though it's
obviously intentional. There is still some logic to it, it's just not
what the spec says.

Usually you just call it a bug if it's something that ought to get
fixed, whether it's a correct implementation of the wrong thing or a
wrong attempt at the right thing.

I am sure you are generally right as a description of common
speech.

The distinction that I was pointing out would then be applied to
within the class of bugs. At least the ones that do follow a
known logic can be dealt with if enough effort is assigned. Those
that do not follow a known logic can be split into a further two
types. One, those that do follow a logic but not a known one.
Two, those that don't follow a logic that can ever be learned in
an individual case.
 
B

Ben C

On 2007-04-26 said:
The distinction that I was pointing out would then be applied to
within the class of bugs. At least the ones that do follow a
known logic can be dealt with if enough effort is assigned. Those
that do not follow a known logic can be split into a further two
types. One, those that do follow a logic but not a known one.
Two, those that don't follow a logic that can ever be learned in
an individual case.

Do you mean logic in the sense of something that the manifestation of
the bug follows? In other words, something related to reproducibility?

In theory the logic behind any bug is there is in the program source
text. In practice if you just read the source text you will find a bug
every few lines but never the one you're looking for.
 
D

dorayme

Ben C said:
Do you mean logic in the sense of something that the manifestation of
the bug follows? In other words, something related to reproducibility?

Yes, that will do fine, reproducibility.

My speculation was also that there could be some surprising and
unwanted effects that are not in this class because they fall
under some part of chaotic events in the partly understood
technical sense that is discussed under Chaos Theory.
 
B

Ben C

Yes, that will do fine, reproducibility.

My speculation was also that there could be some surprising and
unwanted effects that are not in this class because they fall
under some part of chaotic events in the partly understood
technical sense that is discussed under Chaos Theory.

Certainly, especially when the bug is related to uninitialized memory or
unforseen concurrency between threads or processes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top