PRE Tags behave differently in IE, Mozilla

SD_Ryoko

Ultra Cool Member
Reaction score
85
My Reference:

http://world-editor-tutorials.thehelper.net/jassintro.php

I am using the PRE tags for the 'code' statements within the posts.

IE translates the newlines into pre-formatted lines.

Mozilla does not.

Therefore Mozilla 'code' is all on one line.

If I add the line breaks for Mozilla, then its doubled spaced in IE

Why are they not the same?

How can I style the PRE tag to define the line breaks or spacing?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,497
Ah yes?
Hm...

PRE { white-space: pre; } ?


Although it seems somewhat weird to set PREs to PRE...
I didn't look through all of them, but it certainly looks better than all of them as one-liners.
 

SD_Ryoko

Ultra Cool Member
Reaction score
85
Looks correct now.

Lets talk about overflow:auto;

In firefox it appears nicely. A horizontal scroll, no vertical. Enough room to see all verticle lines.

In IE, the vertical size of the box is not enough for the code; and a vertical bar appears as well.

For some one-line code statements, its so small, you have to scroll even to see the one line.
 

Attachments

  • displayerror.jpg
    displayerror.jpg
    64.6 KB · Views: 266

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,497
Weird, indeed.

Hm, it might help to define a height.
In theory, there would also be a min-height...

Or, add an extra line or two before the /pre.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top