Ingo Chao wrote:
Kaspars Dambis schrieb:
...
<div id="main">
<h1>The product</h1>
<div class="column-box">
<div class="column"> content1 </div>
<div class="column"> content2 </div>
</div>
<p>the final paragraph</p>
</div>
...
http://195.13.171.36/work/skurstenis/preview/index_test.php
...
IE (and only, no other does it) shifts the columns on
hovering any of the links inside the lists that are in
columns. In fact, the padding or width of the column
holderbox (or both of the columns) seems to be recalculated.
1) the 1% padding is recalculated
2) the 1% margin is recalculated
both add to the jump of the columns you've encountered. The last line's
"indention" visible on the right is a sign of the padding-jump.
http://www.positioniseverything.net/explorer/percentages.html
...
It was also observed that *only* if using borders or
background color for link hover elements, the strange
shifting occurred.
yes, any background change will cause a jump, even a:hover { background:1%}
Is there a solution? I would not like to add any of
additional divs for the columns.
I think of A) or B).
A) Use quirks mode, delete the DOCTYPE line, or write an "prologue"
- you will need a new centering method:
body{text-align: center}
body * {text-align: left}
B)
Stay in "standards" mode: this is not easy.
1) AFAIK, the padding-percentage shift problem _cannot_ be solved
(%-padding on a "layout"-(dimensioned)-container and links with
:hover-background-change).
Use a 0.5em padding (or use expressions as noted on the page you've
cited): I don't think this will change your design negatively.
2) You don't want to add an additional div, but you'll have to, AFAIK.
But it's a minimal surgery:
<div class="iefixwrapper">
> <div class="column-box">
> <div class="column"> content1 </div>
> <div class="column"> content2 </div>
> </div>
</div>
Currently, you have
.column-box {width: 74%; float: right; background-color: rgb(204, 204,
255);}
For the fix, you have to move the rules to the wrapper and let the
column-box 100% of this wrapper.
.iefixwrapper {width: 74%; float: right; background-color: rgb(204, 204,
255);}
.column-box { width:100%; }
The idea is that the relational bug (calculate with respect to the
parent on :hover /or/ grandparent) will not change the result when both
have the same width ;)
(Note: your test page allows to use #main as a iefixwrapper, but not
your code snippet above.)
regards
Ingo Chao
Hi Ingo,
Thank you very much for the reply, it is very complete and
you confirmed what I thought the bug source is.
I will obviously stay in standards mode and use the
additional div and hope that with the coming IE releases
their primary school math will get better :)
Thank you once again for the in-depth review! I really
appreciate it!
Best regards,
Kaspars
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/