-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Form group has unnecessary float? #475
Comments
This is a duplicate of #257. |
Thanks. Looks like there hasn't been any movement on this for a while. Anyone I should chase on this, or is there a workaround? e.g. generic clearfix class? |
That should be clearing each I'm the person you should chase, sorry for the slow reply. Feel free to open a PR to fix! |
The |
Thanks both. I've managed to solve the problem (accidentally) by reworking the markup, but if I have time will do a PR. |
Looks like this has been fixed... #487 ...thanks @gemmaleigh! |
govuk_elements/assets/sass/elements/_panels.scss
Line 35 in 69070e6
The .form-group class has float:left, width:100% on it, which is causing an issue in the Child Benefit Tax Calculator (we're currently converting it to use Elements). We have a .form-group element immediately followed by another div, which has an id on it used by a jump link in the event of an error condition. Since the .form-group element isn't clearfixed, the next div renders part way through it, rather than after it, so the jump link doesn't appear to quite go to the right position on the page.
Removing the float and width from .form-group fixes this problem, but I want to check our use of Elements is correct before accusing anyone of an actual bug - if there's a general clearfix class I could just apply that to the .form-group to also solve the problem, or is it that .form-group should always be inside something else?
This isn't live yet so I can't link to it, but here's an annotated screenshot. The dashed red border shows the boundary of the following div, showing that the .form-group above it is floated over it.
The text was updated successfully, but these errors were encountered: