erginduran erginduran - 1 year ago 102
CSS Question

how can i make text wrapping in responsive div?

I'm building a site with Bootsrap and using grid system totally. I got a problem with long text.

<div class="row">
<div class="col-md-9">

You see, I don't know the real width size, so I can't do text wrapping in that div. Can I not do text wrapping without fixed width size?

I tried:


but these things works with fixed width size.

Answer Source

Try to use word-wrap: break-word; with display: table-cell;.

@import url('');

.col-xs-1 {
  background-color: yellow;
  display: table-cell;
  word-wrap: break-word;
<div class="row">
  <div class="col-xs-1">

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download