Jump to content

Problem With My Webpage

I searched for answers all over the web but couldn't find any.

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Problem With My Webpage I searched for answers all over the web but couldn't find any. Rate Topic: -----

#1 User is offline   temhawk 

  • W.R. Private First-Class
  • Group: Members
  • Posts: 322
  • Joined: 30-August 07
  • Gender:Male
  • Interests:travel, cg art, macs, music, skateboarding, programming, discovery channel, TextMate 2

Posted 30 August 2007 - 05:16 AM

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
0

#2 User is offline   BigMike Sidelka 

  • W.R. Sergeant
  • Group: Members
  • Posts: 241
  • Joined: 31-July 06
  • Gender:Male
  • Location:C-Town, Ohio

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.
0

#3 User is offline   temhawk 

  • W.R. Private First-Class
  • Group: Members
  • Posts: 322
  • Joined: 30-August 07
  • Gender:Male
  • Interests:travel, cg art, macs, music, skateboarding, programming, discovery channel, TextMate 2

Posted 30 August 2007 - 07:30 AM

Lots of thanks! :cheers:
0

#4 User is offline   temhawk 

  • W.R. Private First-Class
  • Group: Members
  • Posts: 322
  • Joined: 30-August 07
  • Gender:Male
  • Interests:travel, cg art, macs, music, skateboarding, programming, discovery channel, TextMate 2

Posted 30 August 2007 - 09:44 AM

Does anyone else have other ideas?
0

#5 User is offline   Karl Buckland 

  • A.K.A. Sirkent
  • Group: Administrators
  • Posts: 2,145
  • Joined: 04-April 06
  • Gender:Male
  • Location:Kent, UK

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
0

#6 User is offline   sypher 

  • the owner3r
  • Group: Administrators
  • Posts: 1,578
  • Joined: 04-April 06
  • Location:North Wales, UK
  • Interests:Art, Boxing, MMA, Graphic Design, Web Design etc. ;)

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.
sypher design - North Wales Web Design | Latest Work: - Scala Cinema

CSS - Can't See Sh*t
0

#7 User is offline   temhawk 

  • W.R. Private First-Class
  • Group: Members
  • Posts: 322
  • Joined: 30-August 07
  • Gender:Male
  • Interests:travel, cg art, macs, music, skateboarding, programming, discovery channel, TextMate 2

Posted 30 August 2007 - 04:07 PM

View PostSirkent, 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.
0

#8 User is offline   Karl Buckland 

  • A.K.A. Sirkent
  • Group: Administrators
  • Posts: 2,145
  • Joined: 04-April 06
  • Gender:Male
  • Location:Kent, UK

Posted 30 August 2007 - 05:40 PM

View Posttemhawk, 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
0

#9 User is offline   temhawk 

  • W.R. Private First-Class
  • Group: Members
  • Posts: 322
  • Joined: 30-August 07
  • Gender:Male
  • Interests:travel, cg art, macs, music, skateboarding, programming, discovery channel, TextMate 2

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 :P
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users