jumping fieldsets problem - IE only

A

andrew

Hi,

Let me know if I should ask this in a microsoft jscript group instead as the
problem I'm witnessing only seems to appear in IE. Or if you can recommend
another group if this is not an appropriate one.

I'm having a problem with fieldsets in IE moving around on me as I hover
from one table to another. The problem only appears in IE (I'm using v6).
If I hover over the tables row, the bottom fieldset moves up and down as I
move from on table to other.

If I remove the className assignment, the issue does not occur, but I need
to do something similar on my page. Can somebody please tell me what's
going on here? The essence of the sample code is pretty close to what I'm
doing in my real application.

Any help appreciated,
Andrew

<html>
<body>
<script type="text/javascript">
function change(elem) { elem.className = '' }
</script>
<fieldset style="margin-bottom:10px">
<table width="100%">
<tr onmouseover="change(this)"><td>test</td></tr>
</table>
</fieldset>

<fieldset>
<table width="100%">
<tr onmouseover="change(this)"><td>test</td></tr>
</table>
</fieldset>
</body>
</html>
 
Y

Yann-Erwan Perio

andrew wrote:

Hi,
I'm having a problem with fieldsets in IE moving around on me as I hover
from one table to another. The problem only appears in IE (I'm using v6).
If I hover over the tables row, the bottom fieldset moves up and down as I
move from on table to other.

If I remove the className assignment, the issue does not occur, but I need
to do something similar on my page. Can somebody please tell me what's
going on here? The essence of the sample code is pretty close to what I'm
doing in my real application.

There's nothing wrong with your code, you've just encountered quite an
ugly bug in IE - it's difficult to suggest an acceptable workaround
apart from removing the fieldset element or removing the margins in
favor of a spacer element.
Any help appreciated,

Good luck,

Regards,
Yep.
 
M

Michael Winter

There's nothing wrong with your code [...]

Well the OP does omit LEGEND elements which are required and must be the
first child of any FIELDSET element. The LEGEND can be empty. However,
this doesn't affect this bug.

[snip]
it's difficult to suggest an acceptable workaround apart from
removing the fieldset element or removing the margins in favor of a
spacer element.

An alternative that appears to be successful is to switch to a top
margin. If the margins are to be applied via a style sheet, rather than
the style attribute, the OP could add a class to the first FIELDSET
element and over-ride the margin.

Mike
 
Y

Yann-Erwan Perio

Michael Winter wrote:

Hi Mike,
Well the OP does omit LEGEND elements which are required and must be the
first child of any FIELDSET element. The LEGEND can be empty.

ACK, but I was referring to the test case as a whole not being faulty,
not the HTML inside (being myself more interested in how scripting can
be used with HTML than HTML itself, I don't really strive to achieve
complete validity, so rarely comment on that matter).
An alternative that appears to be successful is to switch to a top
margin. If the margins are to be applied via a style sheet, rather than
the style attribute, the OP could add a class to the first FIELDSET
element and over-ride the margin.

Well spotted! I had tested style instead of className, and other
elements instead of table elements, but would not have imagined that
switching from margin-bottom to margin-top could be successful - quite a
paradoxical test:)


Cheers,
Yep.
 

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,999
Messages
2,570,243
Members
46,838
Latest member
KandiceChi

Latest Threads

Top