Welcome to WebmasterWorld Guest from 54.147.28.255

Forum Moderators: open

Message Too Old, No Replies

No line break in Opera!

database content not displayed correctly

     
1:44 pm on Jan 9, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Jan 9, 2003
posts:330
votes: 0


Text that is generated from the database is not displayed correctly in the Opera Browser. While Microsofts Internet Explorer has no problems with that, Opera displays the text in just a single line.

I did not add any <br>-Tags, since the page is not optimated for a special screen resolution. Thanks for your help.

3:22 pm on Jan 9, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Sept 1, 2001
posts:4392
votes: 0


Since you are writing code to retrieve data from the database, I would write some code to make sure it is displayed properly in all situations, and not let the browser take that responsibility.

It can be frustrating I know, but I think it will be worth it for you to exercise more control over the layout.

3:45 pm on Jan 9, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Jan 9, 2003
posts:330
votes: 0


I know, but I don't know why Opera is not displaying the information correctly.

The Text ist just in one line. But that should not be the reason why it is not working.

5:18 pm on Jan 9, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


Seems to me that text should wrap (in ANY browser) according to the size of the containing block.

I'd suggest checking your code that declares the width of the container/parent element for the text and make sure that it's valid.

5:27 pm on Jan 9, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 7, 2003
posts:1230
votes: 0


to add to tester, i would check if there are possiblities for linebraks in that line at all, you'll need spaces for it and there should be not &nbsp; which will prevent browsers to linebreak at this special character.
6:26 pm on Jan 9, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Sept 1, 2001
posts:4392
votes: 0


By the way - forgot to say it earlier -

Welcome to Webmaster World!

6:28 pm on Jan 9, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Jan 9, 2003
posts:330
votes: 0



style.css:
----------------------
.texnorm {
text-align: justify;
vertical-align: top;
white-space: pre;
clip: rect( );
line-height: normal;
margin-top: 0px;
padding-top: 0px;
position: relative;
top: 0px; }
--------------------------

<table border="0" width="95%" cellpadding="0" cellspacing="0" align="center">
<tr>
<td colspan="3" height="35" valign="top"><p class="texnorm">Text</p><br></td>
</tr>
</table>

The Text in the table is just normal text. If I open the source code, the only thing that is different, is that the text is written in one line.

It might be that Opera does not understand the text-align: justify; Command.

7:10 pm on Jan 9, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


Opera does just fine with "justify" -- it's this rule that's creating your situation:

white-space: pre;

Opera is handling it CORRECTLY, and Explorer is not! Just get rid of the rule and things should be fine.

W3Schools Reference - white-space property [w3schools.com]

7:15 pm on Jan 9, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 4, 2002
posts:1314
votes: 0


It could be that w h i t e s p a c e p r e

nowrap would definitely cause the problem you have. Possible Opera is intepreting pre as "pre and nowrap". How do they work if you try normal?

Sorry for double spacing those two words but WebmasterWorld preview went doolally when I quoted them directly. Bug Brett?

9:29 pm on Jan 9, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 7, 2003
posts:1230
votes: 0


it is the pre setting. pre stands for pre-formatting. this is useable if you want to list source or texts on a website and you don't want to set the breaks. it's like the good old <pre> tag in html. since version 1 of html i guess.
9:36 pm on Jan 9, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Jan 9, 2003
posts:330
votes: 0


thanks a lot.

that worked just great!

Clemens

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members