Welcome to WebmasterWorld Guest from 54.226.89.2

Forum Moderators: open

Message Too Old, No Replies

No line break in Opera!

database content not displayed correctly

     

globay

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

10+ Year Member



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.

txbakers

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

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



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.

globay

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

10+ Year Member



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.

tedster

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

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



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.

hakre

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

WebmasterWorld Senior Member 10+ Year Member



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.

txbakers

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

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



By the way - forgot to say it earlier -

Welcome to Webmaster World!

globay

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

10+ Year Member




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.

tedster

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

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



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]

victor

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

WebmasterWorld Senior Member 10+ Year Member



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?

hakre

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

WebmasterWorld Senior Member 10+ Year Member



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.

globay

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

10+ Year Member



thanks a lot.

that worked just great!

Clemens

 

Featured Threads

Hot Threads This Week

Hot Threads This Month