A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
Div text too close to the border
Joined: Apr 23, 2014
Apr 23, 2014 05:21:16
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?
Joined: Nov 06, 2012
Apr 23, 2014 07:05:13
Read my books:
Hello! HTML5 & CSS3
HTML5 in Action
Read my blog
I agree. Here's the link:
subject: Div text too close to the border
div 'overflow:auto;' css question...
center a div inside a div
DIV and CSS Help
CSS expanding div
how to include 2 or 3 buttons within a border or just simply a square?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014