css prevent text wrap

38

div {
  white-space: nowrap;
  overflow: hidden;
}
/* If you don't know why your line is breaking or you just want to make sure
this doesn't happen, add the CSS bellow: */
white-space: nowrap;

/* Example: */
/* HTML: */
<p>This is a paragraph<p>
/* CSS: */
p { white-space: nowrap; }
div {
  white-space: nowrap;
}
div {
  /* This is the default, you don't need to
     explicitly declare it unless overriding
     another declaration */
  white-space: normal; 
}
div {
  overflow: hidden;
}

Comments

Submit
0 Comments