PDA

View Full Version : Fieldset Issue


J_mo
04-30-2010, 08:47 AM
Hi,

I am trying to display my fieldset legend as a block which spans the width of the form, with the title to the left as illustrated by the complex diagram below:

-------------------------------------------------------------------------
Legend
-------------------------------------------------------------------------
Form
Form
-------------------------------------------------------------------------

I am having some serious difficulties getting this done and expecially matching the layout between IE and the other browsers

Can anyone help
Thanks
Phil

Corrosive
04-30-2010, 08:54 AM
If you leave any width off the CSS it should expand to fit the apce it occupies. Is that what you mean?

Corrosive
04-30-2010, 09:07 AM
Adding to that you may need to set display: block; on your label CSS

J_mo
04-30-2010, 09:09 AM
Hi, thanks,

Basically, the problem seems to lay with the IE fieldset, it has the indents on either side of the legend...can they be removed??

Phil

Corrosive
04-30-2010, 09:20 AM
Have you tried fieldset {margin: 0; padding: 0;} ??

J_mo
04-30-2010, 09:54 AM
Yeah, I have even gone back through everything to check. Here is my CSS

.form {line-height: 2.0em; border: 0; background: #fbfbfb; font-size: 14px;}
.form h3 {font-size: 110%;}
.form legend { background: #333; width: 100%;}
.form label { float: left; text-align: right; vertical-align: middle; width: 150px; clear: left; margin-right:5px;}
.form input { margin-top: 5px; }
.form select { margin-top: 5px; }
.form .hint {vertical-align:middle;}
.formSubmit { border: none; margin-top: 10px; padding-left:155px;}

With this, I have a margin to the left in IE??

Corrosive
04-30-2010, 10:04 AM
Try the fieldset CSS I suggested.

J_mo
04-30-2010, 10:05 AM
Sorry, I have. Must have missed it when I copied & pasted!!

Corrosive
04-30-2010, 10:19 AM
I'm sure it can only be the default padding/margin on fieldsets that is doing this.

J_mo
04-30-2010, 11:07 AM
That is what I thought...but I have tried everything...grrr!!

Corrosive
04-30-2010, 11:36 AM
You've got to love IE haven't you?