Questions tagged [fieldset]

The fieldset tag is used to group related elements in HTML and XHTML documents. The fieldset tag draws a box around the related elements.

The fieldset tag is used for organizing and grouping related elements within a form. The tag when used the proper way makes HTML and XHTML documents more accessible to nonvisual browsers. When using the fieldset tag the browsers may display a box around the elements within the fieldset tag. The fieldset tag requires an end tag. You can also nest fieldset tags.

520 questions
228
votes
4 answers

resizes wrong; appears to have unremovable `min-width: min-content`

Problem I have a to resize so it is never wider than its parent, even if it has to cut off its displayed text. max-width: 100% should do that. Before resize: What I…
Rory O'Kane
  • 29,210
  • 11
  • 96
  • 131
187
votes
11 answers

Why do we need a fieldset tag?

Why do we need a
tag? Whatever purpose it serves is probably a subset of the form tag. I looked up some info on W3Schools, which says: The
tag is used to group related elements in a form. The
tag draws a box around…
Eastern Monk
  • 6,395
  • 8
  • 46
  • 61
85
votes
13 answers

Is there any way to have a fieldset width only be as wide as the controls in them?

It seems that fieldset defaults to 100% width of its container. Is there any way that you can have the field set just be as big as the widest control inside the fieldset?
leora
  • 188,729
  • 360
  • 878
  • 1,366
60
votes
9 answers

Is it possible to achieve a
-like effect without using the
tag?

I personally like the
tag because of how it draws a box and puts the at the top of it, over the border. Like this. However, the fieldset element was made to organize forms, and using it for general design is no better than using…
zneak
  • 134,922
  • 42
  • 253
  • 328
55
votes
7 answers

Which CSS tag creates a box like this with title?

I want to create a box like this with title: Can any one please let me know if there is a default CSS tag to do this? Or do I need to create my custom style?
Mozammel
  • 1,011
  • 1
  • 13
  • 15
44
votes
3 answers

Is it wrong to use the fieldset tag without form tag?

I was wondering if I can use the fieldset tag without being inside a form. Because I like the way it encloses the legend & the border stuff around the inner html. When I use it to enclose li element, it does behave like its actually there(visual)…
Clone
  • 919
  • 4
  • 11
  • 22
41
votes
6 answers

Django and fieldsets on ModelForm

I know you can specify fieldsets in django for Admin helpers. However, I cannot find anything useful for ModelForms. Just some patches which I cannot use. Am I missing something? Is there a way I could achieve something like fieldsets without…
Krystian Cybulski
  • 10,789
  • 12
  • 67
  • 98
41
votes
10 answers

How to position the legend inside a fieldset with a border?

According to the several references on the web, it is not possible to position a legend. So it is suggested to wrap it with span: Foo Then we can position the span inside the fieldset. but then when I want to add a…
nocss guy
  • 413
  • 1
  • 4
  • 4
35
votes
2 answers

Why won't my element display inline?

I am trying to apply display: inline; to the element in my
element, so that the following will follow on the same line, but my CSS is having no effect. legend{ display: inline; } span { display:…
Mild Fuzz
  • 29,463
  • 31
  • 100
  • 148
32
votes
4 answers

What are the advantages of using the fieldset tag?

What are the advantages of using the
tag? I don't really get what it is used for.
Diego
  • 16,436
  • 26
  • 84
  • 136
27
votes
7 answers

Rounded corners on a fieldset

I noticed that the "fieldset" tag renders a rounded corner border on IE (it renders squared on the other browsers).
My legend
BUT if i set a CSS style on the fieldset, the rounded corners…
Olivier Payen
  • 15,198
  • 7
  • 41
  • 70
27
votes
7 answers

Default CSS values for a fieldset

I'm trying to use a as a title inside a
. In browsers other than IE, the is positioned on the top border of the
, with the text perfectly centered on the line. I'm trying to reset it's position so that it sits…
Marko
  • 71,361
  • 28
  • 124
  • 158
26
votes
6 answers

Does the use of the fieldset HTML tag have meaning beyond grouping forms?

Usually, I've seen it with forms, but I've found it helpful to group related sets of data (eg when you have multiple tables on a page, using a fieldset around each table or group of related tables to define a visible meaning and a group name…
Thomas Owens
  • 114,398
  • 98
  • 311
  • 431
21
votes
1 answer

Why are not all flexbox elements behaving like flexbox divs?

Why is flexbox not working properly with fieldset or other non-div tags? I expect them to line up next to each other like in the div example, as flex-direction: row; is default in flexbox. However fieldset is force applying a width to them, and I do…
Andreas
  • 2,287
  • 2
  • 23
  • 26
19
votes
6 answers

How can I disable all elements inside a fieldset in jQuery?

I have 2
s on my page, but one of them should have all of it elements disabled depending on some user's choice. The fieldsets contain text inputs, selects, and links. Is there a way to disable all of them instead of disabling them one by…
André Miranda
  • 6,420
  • 20
  • 70
  • 94
1
2 3
34 35