I am trying out bootstrap columns, so I have a column which occupies 8 parts of the row, And the second part occupies the 4 parts. But the 8 parts div has more content, and it is overflowing. how to stop that behaviour.
.bggreen {
background: green;
}
.bgred {
background: red;
}
.border {
border: 1px solid black;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<div class="container">
<div class="row">
<div class="col-md-8 bggreen border">This is not normal column. This is supposed to be a bigger column which occupies 8 parts of the row, while the next div occupies only 4 parts ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
</div>
<div class="col-md-4 bgred border">This is ver small</div>
</div>
</div>
3
Answers
It is the default behaviour since the dots do not have a breaking character and is treated as a single word. You can use
word-wrap: break-word
for creating a new line after the parts text orword-break: break-all
to continue the dots with the text.Define a class
hideOverflow
with overflow hidden and then text-overflow property to ellipsis. That will do the trick.Word-wrap property breaks the text and avoids the overflow. In your css file add the following style.
you can visit this website http://www.aubrett.com/InformationTechnology/WebDevelopment/CSS/FailSafeCSS1.aspx