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

Adjacent Fieldsets: Tables neccesary?

P: n/a
I'm trying to be a good little coder and design my HTML form with as
much semantic HTML and CSS as possible.

I'm using fieldsets, legends, and labels. It seems like the only way
to reliably put fieldsets next to each other on the same row is to use
table cells.

Is there a better way? I'm designing my fieldsets based on this
technique:

http://www.pixy.cz/blogg/clanky/css-...andlabels.html

(essentially floating the label next to it's input field).

Displaying the field set inline causes Bad Stuff(tm) to happen with my
formatting.

I'm not against tables, but if anyone has a better idea I'd like to
hear it.
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Trent wrote:
I'm using fieldsets, legends, and labels. It seems like the only way
to reliably put fieldsets next to each other on the same row is to use
table cells.


fieldset {
display: table-cell;
}

Or, if you want it to work with Internet Explorer:

fieldset {
float: left;
width: 10em;
}
--
Jim Dabell

Jul 20 '05 #2

P: n/a
sp*******@marx7.org (Trent) wrote:
I'm using fieldsets, legends, and labels. It seems like the only way
to reliably put fieldsets next to each other on the same row is to use
table cells.


Depends on your definition of "reliably". But you can use floating
(probably simplest), as suggested, or positioning.

On the other hand, why? Forms exist for the purpose of being filled out
on screen. There is no actual benefit from having fields side by side. It
can even disturb a screen reader, or a somewhat confused "normal" user.

It's normally best to put one field with its label, and nothing more, on
one line. Even the simplest screen readers can handle that, and it
maximizes the odds of correct association in the mind of a user looking
at a visual presentation.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #3

P: n/a
DU
Trent wrote:
I'm trying to be a good little coder and design my HTML form with as
much semantic HTML and CSS as possible.

I'm using fieldsets, legends, and labels. It seems like the only way
to reliably put fieldsets next to each other on the same row is to use
table cells.

Is there a better way?

I have used fieldset {display:inline;} so that fieldset border
shrink-wraps around content and to workaround a bug (bug 123293 in
Opera's BTS) in Opera 7.x, I dynamically set the display of fieldset to
inline-block.

http://www10.brinkster.com/doctorunc...ormatting.html

http://www10.brinkster.com/doctorunc...layInline.html

DU
I'm designing my fieldsets based on this technique:

http://www.pixy.cz/blogg/clanky/css-...andlabels.html

(essentially floating the label next to it's input field).

Displaying the field set inline causes Bad Stuff(tm) to happen with my
formatting.

I'm not against tables, but if anyone has a better idea I'd like to
hear it.

Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.