Hello, thanks for helping me!
I like making websites, and I work together with a friend of mine.
The problem I have is this:
I have a forum-like html page, and whenever a really long "word" like "NOOOOOOOOOOOOOOOOOOOOOOOOOOO" (but ten times longer) for example, is inserted into the page, no line break occurs. So what happens is that I get a horizontal scroll bar, which I really want to avoid!
(How) Is it possible to force a line break even in the middle of a word in order to keep the page width screen-sized? (or in any case: the prefered width)
Hoping for answers, temhawk
Problem With My Webpage
I searched for answers all over the web but couldn't find any.
Page 1 of 1
Problem With My Webpage I searched for answers all over the web but couldn't find any.
#2
Posted 30 August 2007 - 05:42 AM
Im not sure how you could force a line break, but another option is in the css to add overflow:hidden; which will just hide any text that goes beyond the specified width.
#5
Posted 30 August 2007 - 09:58 AM
There is another CSS way. Can't remember where I found this:
white-space: -moz-pre-wrap; /* Mozilla */ white-space: -pre-wrap; /* Opera 4 - 6 */ white-space: -o-pre-wrap; /* Opera 7+ */ white-space: pre-wrap; /* CSS3 - Text module (Candidate Recommendation) http://www.w3.org/TR/css3-text/#white-space */ word-wrap: break-word; /* IE 5.5+ */
QUOTE(benbramz @ Aug 17 2007, 07:44 AM) Ive noticed that quite a few people are now adding quotes from the board into their signature. I think its started an new web-radiance craze.. :P
#6
Posted 30 August 2007 - 02:11 PM
Post your code 
I've come across this problem before, its to do with how you assign the width of the element the text will be in.
I've come across this problem before, its to do with how you assign the width of the element the text will be in.
#7
Posted 30 August 2007 - 04:07 PM
Sirkent, on Aug 30 2007, 07:31 PM, said:
There is another CSS way. Can't remember where I found this:
white-space: -moz-pre-wrap; /* Mozilla */ white-space: -pre-wrap; /* Opera 4 - 6 */ white-space: -o-pre-wrap; /* Opera 7+ */ white-space: pre-wrap; /* CSS3 - Text module (Candidate Recommendation) http://www.w3.org/TR/css3-text/#white-space */ word-wrap: break-word; /* IE 5.5+ */
I know it's best to make your website as compatible with browsers as possible. But how necessary do yous think to include code for relatively old browsers like Opera -6? I think the vast majority of internet users that use Opera have upgraded to Opera 9 by now.
#8
Posted 30 August 2007 - 05:40 PM
temhawk, on Aug 31 2007, 12:40 AM, said:
I know it's best to make your website as compatible with browsers as possible. But how necessary do yous think to include code for relatively old browsers like Opera -6? I think the vast majority of internet users that use Opera have upgraded to Opera 9 by now.
It's only one line of CSS... The way I look at it, it's not exactly an ugly hack for the payoff.
QUOTE(benbramz @ Aug 17 2007, 07:44 AM) Ive noticed that quite a few people are now adding quotes from the board into their signature. I think its started an new web-radiance craze.. :P
#9
Posted 31 August 2007 - 03:11 AM
Though when you consider all the various CSS elements that exist, it ads up to quite a few more lines than just one. I always have the feeling each browser wants their own syntax standards. Of course that's not true but the more lines of code you have to define just a single property, the more pointless it feels since some day, each browser (better) understand the same code.
I'm intermediate in Pascal and, although I know well that browsers aren't programmed in pascal, I can't imagine it to be so much extra work for the programmers of, say firefox, to make the browser understand a universal CSS definition. I just think it's cleaner without so many extra-necessary, yet pointless lines of code.
I hope some browser developers are reading this, thank you
I'm intermediate in Pascal and, although I know well that browsers aren't programmed in pascal, I can't imagine it to be so much extra work for the programmers of, say firefox, to make the browser understand a universal CSS definition. I just think it's cleaner without so many extra-necessary, yet pointless lines of code.
I hope some browser developers are reading this, thank you
Share this topic:
Page 1 of 1


Help
This topic is locked

MultiQuote











