Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
When a radios, checkboxes, fieldset or fieldgroup element is child of a fieldset or fieldgroup element, their legend positions are messed up.
Screenshot:
Proposed resolution
Fix <legend>
CSS.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#15 | 2498163-success.png | 117.24 KB | MrPaulDriver |
#13 | seven-legend_overlap-2498163-13.patch | 467 bytes | jeni_dc |
#6 | Logging_and_errors___D8_Patch 2.png | 54.48 KB | nathanlawsn |
#6 | Logging_and_errors___D8_Patch.png | 51.5 KB | nathanlawsn |
#6 | Screen Shot 2015-07-23 at 11.16.08.png | 81.04 KB | nathanlawsn |
Comments
Comment #1
ArlaScreenshot of fix:
Comment #2
idebr CreditAttribution: idebr commented@Arla I'm having trouble reproducing this error. Can you provide an example URL or code?
Comment #3
LewisNymanIs this when you have two legends inside of a fieldset?
Comment #4
ArlaFor an example, apply this (silly) patch and check the page at admin/config/development/logging
Comment #5
Manjit.SinghComment #6
nathanlawsn CreditAttribution: nathanlawsn commentedPatch in #4 reproduces this error.
Applying the original patch in #1 fixes the issue with the legends overlapping but the fieldset legend no longer sits inline with the border. Should this be the case?
Should it not look more like this?
Comment #7
Manjit.Singh@nathanlawson91 I did not found any fieldsets on admin/config/development/logging
Where can i check these fieldsets ?
Comment #8
emma.maria@Manjit.Singh for some reason you need to apply the patch in #4 to see the issue. I cannot figure out why though. Maybe ping the Seven maintainer @lewisnyman for more info.
Comment #9
LewisNymanYeah, you have to apply the do-not-test.patch to provide an example of a fieldset. We don't have any in core but contrib will have them.
Comment #10
LewisNymanThe design of the fieldset should follow the design in https://groups.drupal.org/node/283223
Comment #11
Manjit.Singh@Emma Thanks for the help. But is there any need to apply fieldset here.
Comment #12
LewisNyman@Manjit.Singh No, it's just an example implementation
Comment #13
jeni_dc CreditAttribution: jeni_dc commentedChanging the fieldset CSS to only select the direct child legend fixes the overlap. I've attached a patch with the quick change.
Comment #14
jeni_dc CreditAttribution: jeni_dc commentedComment #15
MrPaulDriver CreditAttribution: MrPaulDriver commentedPatch at #13 seems to fix
Comment #16
MrPaulDriver CreditAttribution: MrPaulDriver commentedVisual check indicates problem resolved as per screen shot in previous post. Code appears fine.
Comment #17
alexpottCommitted 231b59f and pushed to 8.0.x. Thanks!