View Full Version : Is there a way to change this?
IanMarlowe
08-01-2005, 11:36 AM
<fieldset style="background:lime">
<legend>Health information:</legend>
<form>
Height <input type="text" size="3" />
Weight <input type="text" size="3" />
</form>
</fieldset>
If you try this code and save it, the border will go out of the top of the "box". Is there a way to change this, so that it only stays within the "box"?
IanMarlowe
08-01-2005, 12:35 PM
aha, thx. how?
<fieldset style="top-padding=3px background=lime">?
For a start, it's background-color, not background.
The property you want is padding-top, not top-padding.
mwinter
08-01-2005, 03:33 PM
[With a fieldset] the border will go out of the [b]top of the "box". Is there a way to change this, so that it only stays within the "box"?In IE? No, I very much doubt it. As you probably know, IE uses the Windows OS to render its controls, so it's at its mercy. Rather than rendering the legend element as a separate thing, it's part of the standard grouping control in the GDI toolset, in which the background colour is the entire control, including the region outside the border.
By the way, the form element should contain the fieldset element, not the other way around.
Mike
I was thinking he was talking about the background, and trying to make the background smaller with padding.
mwinter
08-01-2005, 03:48 PM
I was thinking he was talking about the background, and trying to make the background smaller with padding.Background colours are rendered everywhere inside the border, including any padding.
The background renders outside the border in IE. In fact, in IE padding-top on a fieldset element acts above both the legend text and the border of the element.
Mike
Above the border? Isn't that what margin is for?
mwinter
08-01-2005, 08:00 PM
Above the border? Isn't that what margin is for?Yes. Precisely my point. Microsoft's implementation of the fieldset element is inflexible and, as far as CSS is concerned, wrong. That's why I don't think Ian will be able to resolve the problem.
Mike
IanMarlowe
08-02-2005, 04:14 AM
thanks.......:(
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.