• Post Reply Bookmark Topic Watch Topic
  • New Topic

Div text too close to the border  RSS feed

Daniel Thomson
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
Ranch Hand
Posts: 297
Android Fedora Firefox Browser
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!