View Full Version : long words break pagelayout. how to fix with CSS?
jammodotnet
14th June 06, 09:27 PM
I know about the word:wrap
but that's CSS3
any other method to keep text, and long-posted-URLS from breaking my layout?!
view what i mean here: http://www.jammo.net/jam/
it's about half-way down the page.
Jbilsten
16th June 06, 05:32 PM
afaik that has to be caught server side. CSS doesn't have a way to fixing that for you at the moment.
tyson
17th June 06, 02:10 AM
There's always overflow: hidden or overflow: scroll
Jbilsten
19th June 06, 01:20 PM
That's true, although hidden would hide the long word and scroll would just put a scroll bar there... But both "fixes" none the less. You'd be better off fixing it server side if you can. :)
jammodotnet
19th June 06, 03:44 PM
You'd be better off fixing it server side if you can. :)thanks.
i'll look into that.
frankyonnetti
16th July 06, 09:59 PM
{word-wrap: break-word;} works in IE perfectly, which can be helpful in some cases. I found that in FF long words just overflow and won't always break boxes where IE will each time.
sbstash
21st July 06, 04:44 PM
Not exactly the most elegant thing in the world, but it will work - you can always put a line break <br /> in the URL as it appears on the page. Just be sure to not <br /> in the link itself.
Example:
<a href="http://www.reallyreallyreallylongURL.com">http://www.reallyreallyreally<br />longURL.com</a>
I know this isn't automatic, and like I said not the most beautiful way of doing things, but it gets the job done. The link will still work correctly and nobody will know the difference. If you're creating a walk-through, you might want to use some sort of symbol to show you've put a line break in. They use this method over at A List Apart (http://www.alistapart.com/) regularly.
csshuckster
23rd July 06, 03:51 PM
I put a defined width on text blocks or content areas and that seems to work for me, i rarely use overflow or anything like that
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.