Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Div text too close to the border

 
Daniel Thomson
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In testing the div boxes, the text is rendered too close to the border for viewing comfort:



Trying to use padding to give the text spacing, however, forces the divs to expand outside their width:


(On the far right the black dotted lines of the div are outside the red div - the area it's supposed to be inside. The div on the far left is also bigger than normal).

It will break the div boundary even if max-width is set.

I tried to use word-wrap: word-break, however the text still breaks the div's boundaries and makes the text look horrible.


Is there some way in CSS to get the text to move away from the border without increasing the div's size?

 
Rob Crowther
author
Ranch Hand
Posts: 297
5
Android Fedora Firefox Browser
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic