-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
Line breaks in HTML wrecks labels' horizontal size and spacing #14081
Comments
You should be using spans instead of divs. |
Hi @Yardboy! You appear to have posted a live example (http://jsbin.com/dufiquge/2), which is always a good first step. However, according to the HTML5 validator, your example has some validation errors, which might be causing your issue:
You'll need to fix these errors and post a revised example before we can proceed further. (Please note that this is a fully automated comment.) |
Thanks, you're right I should be using spans instead of divs. However, the problem exists with spans as well: http://jsbin.com/dufiquge/2/edit?html,output |
Labels are |
However, it's not just white space/spacing - look at the blown up image in the OP above, the horizontal size of two of the labels actually changes. It seems to be specifically related to the line break, see this version of the jsbin where I've removed all white space on the problem code except for the line break: http://jsbin.com/dufiquge/4/edit?html,output |
Yeah, it's where the white space from how HTML is rendered is applied. When there are line breaks within the opening and closing tags, it's within. When there are no line breaks around the inner content, the white space is on the outside. |
Going to punt this to v4. I want to rework labels—the |
Okay, I appreciate you taking a look. |
The two snippets below are identical except for the line breaks around the content, yet they produce different output in the browser. The line breaks in the second snippet affect the horizontal spacing of the labels, as shown in the images below.
It specifically seems to be related to the line break that comes AFTER the content, as demonstrated here: http://jsbin.com/dufiquge/1/edit?html,output.
The text was updated successfully, but these errors were encountered: