I know i should probably leave examples of the code i have used. but code is very large and i cannot make a test case.
I have a fieldset with a border and the top border is too long and is extended past the corner of the fieldset. this only happens in IE7. amazingly, no such problems in ie6.
has anyone come across this problem themselves? and do you know how to fix the problem?
Legends and Fieldsets can be awkward to style, even in the more modern standards compliant browsers like Firefox and Opera so you’re best bet is to use this method…
I’d still love to know if this is an IE7 thing though… even though I use Tyssen’s ideas I also occaisionally use the original fieldset too… so far everything’s cool in 7 but if there’s some weird bug, it would be good to know.
Seems that if you have an element inside the fieldset that’s overflowing to the right of the fieldset, it extends the top border. I had a container set to a width of 100% with no padding or margins which IE7 thought was overflowing for some reason (even though the content inside this container was right-aligned and viewable within the border of the fieldset).
I was able to fix it just by adding overflow:hidden to the fieldset.
I had just noticed that problem with one of my forms last night and hadn’t had time to look into fixing it yet. Now thanks to this post I know how. The problem does appear to be restricted to just IE7 as it doesn’t happen in IE6 or IE8.