By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 971 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

IE and Legends

P: n/a
I have a page with a couple of forms on it that have a light background
color. The form boxes have legends for the title of each box. All is
well with the world until I view the page in IE. In IE, the background
color extends up and out of the form box and well beyond the top of the
legend box. Take away the legend and the color stays in the borders.
(Please see http://www4.scoe.net/rfox/drdp/legend.html )

Is there any way to format the page so the boxes' background color
stays within the box borders in IE?

-Ray

Oct 6 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
PW
(Please see http://www4.scoe.net/rfox/drdp/legend.html )
>
Is there any way to format the page so the boxes' background color
stays within the box borders in IE?
See if this works...

Wrap your fieldset content with a div (excluding the legend), and give the
div a class of "fbody ". Then implement the following:

<!--[if lt IE 8.0]>
<style type="text/css">
fieldset {
background-color : transparent;
position : relative;
padding : 0;
margin : 0;
}
fieldset .fbody {
background-color : #ddeaf2;
padding : 22px;
margin : 15px 0 0;
}
legend {
position : absolute;
}
</style>
<![endif]-->
Oct 7 '06 #2

P: n/a
PW
fieldset .fbody {
background-color : #ddeaf2;
padding : 22px;
margin : 15px 0 0;
}
Minor nit... "margin : 15px 0 0" should have been "margin-top : 15px".
Oct 7 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.