Search code examples
htmlcssclearfix

text not expanding the div


In my card, the text is not expanding vertically the div. I tried to use the clear property, but doesn't helped. Any ideas?

here is my actual code: http://jsfiddle.net/kuupsdm5/1

Card


Solution

  • Change your .card-body class:

    .card-body {
      padding: 15px;
      border-left: 1px solid rgba(0,0,0,0.2);
      border-right: 1px solid rgba(0,0,0,0.2);
      border-bottom: 1px solid rgba(0,0,0,0.2);
      word-wrap: break-word;
    }
    

    You have a very long word there and if you don't include the word-wrap:break-word; it will stay on a single line. Width 100% along with the padding was also causing the line to extend beyond the others, so either remove the padding or width 100% from the class.

    JS Fiddle Demo