Skip to content
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

Long label do not wrap to next line #109

Open
0xadri opened this issue Feb 16, 2016 · 0 comments
Open

Long label do not wrap to next line #109

0xadri opened this issue Feb 16, 2016 · 0 comments

Comments

@0xadri
Copy link

0xadri commented Feb 16, 2016

Long label do not wrap properly to next line, see by yourself on this jsfiddle:

https://jsfiddle.net/AdrienBe/t38fcLjh/1/

I found a way to fix this using the following CSS:

.prettycheckbox label,
.prettyradio label {
  float: none;
  line-height: 20px;
  margin-left: 40px;
  margin-top: 5px;
}

See the fix on jsfiddle https://jsfiddle.net/AdrienBe/bm5xv7t6/

This fix might not work when the label is positioned on the left. It is a good start I believe though.

An improvement to this solution would be to also add:

.prettycheckbox label,
.prettyradio label {
  word-break: break-word;
  word-wrap: break-word;
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  hyphens: auto;

  /* break long words, see https://jsfiddle.net/AdrienBe/fyr25nh1/ */
  float: none;
  line-height: 20px;
  margin-left: 40px;
  margin-top: 5px;
}

See this fix on jsfiddle https://jsfiddle.net/AdrienBe/bm5xv7t6/3/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant