F
F
fatal2010-10-29 07:38:46
css
fatal, 2010-10-29 07:38:46

Is there a way to get IE7 to correctly calculate the width of a box inside an absolutely positioned container?

Description of the problem with the tests: brunildo.org/test/iew_shrink_lay.html
I can't think of anything other than using expression:
.child { width: expression(runtimeStyle.width = parentNode.offsetWidth + 'px') }

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
begebot, 2010-10-29
@begebot

If you just need to specify the width of the inner element as a percentage of the parent, you can come up with a solution. For example, you can specify 50% width like this:

<div style="padding-right:50%;"><div class="s">i i i</div></div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question