468,106 Members | 1,500 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,106 developers. It's quick & easy.

jumping fieldsets problem - IE only

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>

Jul 23 '05 #1
4 1475
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.
Jul 23 '05 #2
On 13/07/2005 21:07, Yann-Erwan Perio wrote:
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

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Jul 23 '05 #3
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.
Jul 23 '05 #4
Thanks for the responses. It's always fun working with IE. :)

"Yann-Erwan Perio" <ye*@invalid.com> wrote in message
news:42**********************@news.free.fr...
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.

Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by PatD | last post: by
3 posts views Thread by Trent | last post: by
6 posts views Thread by Steve Lefevre | last post: by
reply views Thread by andrew | last post: by
realin
1 post views Thread by realin | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.