artfultheory
07-01-2007, 09:53 PM
I'm sure as usual I'm the cause of my own pain, and as usual, the story begins "So, in IE6 I have this nicely formatted..."
... scrollable selection list. However, after I've hovered any of list items, the list width expands and the scrollbar gets clipped off.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
body { font-family: Helvetica, Arial, Tahoma, Verdana, sans-serif; font-size: 9pt; }
div.myForm { width: 15em; background-color: beige; }
div.detailPane { margin: 1em; }
div.selectList { background-color: white; border: solid 1px black; width: 100%; height: 4em; overflow: scroll; overflow-x: hidden; }
div.selectList a { padding-left: .2em; white-space: nowrap; color: Black; display: block; text-decoration: none; }
div.selectList a:hover { background-color: Maroon; color: White; }
</style>
</head>
<body>
<div class="myForm">
<div class="detailPane">
Hovering over the list hides the scrollbar in IE6
<div class="selectList">
<a href="">test1</a>
<a href="">test2</a>
<a href="">test3</a>
<a href="">test4</a>
</div>
</div>
</div>
</body>
</html>
Any suggestions as to either a fix or better overall approach would be appreciated.
BODY style isn't relevant to the bug.
.MYFORM style isn't relevant to the bug, but I'll need an outer positioning div in my final solution.
.DETAILPANE { PADDING } is required for the bug (MARGIN has the same problem).
Removing OVERFLOW-X changes the bug to annoying flashing (and makes IE do other funky stuff depending on container sizes).
Removing :HOVER { BACKGROUND-COLOR } removes the bug, but I'd sure like that effect without resorting to javascript.
I've found posts that seem to be related, but they assume I have a lengthy history of dealing with IE "hasLayout" bugs.
My original code was actually wrapped in UL/LI, but I've stripped them for the sake of brevity and this shows the same bug. Just mentioning it to keep the flames down to the ones I actually deserve.
... scrollable selection list. However, after I've hovered any of list items, the list width expands and the scrollbar gets clipped off.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
body { font-family: Helvetica, Arial, Tahoma, Verdana, sans-serif; font-size: 9pt; }
div.myForm { width: 15em; background-color: beige; }
div.detailPane { margin: 1em; }
div.selectList { background-color: white; border: solid 1px black; width: 100%; height: 4em; overflow: scroll; overflow-x: hidden; }
div.selectList a { padding-left: .2em; white-space: nowrap; color: Black; display: block; text-decoration: none; }
div.selectList a:hover { background-color: Maroon; color: White; }
</style>
</head>
<body>
<div class="myForm">
<div class="detailPane">
Hovering over the list hides the scrollbar in IE6
<div class="selectList">
<a href="">test1</a>
<a href="">test2</a>
<a href="">test3</a>
<a href="">test4</a>
</div>
</div>
</div>
</body>
</html>
Any suggestions as to either a fix or better overall approach would be appreciated.
BODY style isn't relevant to the bug.
.MYFORM style isn't relevant to the bug, but I'll need an outer positioning div in my final solution.
.DETAILPANE { PADDING } is required for the bug (MARGIN has the same problem).
Removing OVERFLOW-X changes the bug to annoying flashing (and makes IE do other funky stuff depending on container sizes).
Removing :HOVER { BACKGROUND-COLOR } removes the bug, but I'd sure like that effect without resorting to javascript.
I've found posts that seem to be related, but they assume I have a lengthy history of dealing with IE "hasLayout" bugs.
My original code was actually wrapped in UL/LI, but I've stripped them for the sake of brevity and this shows the same bug. Just mentioning it to keep the flames down to the ones I actually deserve.