Jump to content

Internet Explorer and <pre> tags positioning


TAz69x

Recommended Posts

I'm using pre tags to display preformatted text on a page from a database, and in Firefox, the 800px pre boxes appear one on top the other without CSS editing, and with 5px padding on their bottom (with id's, # ) with CSS editing, they appear perfectly 5px from each other vertically.  But in internet explorer, the vertical-width between two pre "boxes" seems to START at 5px or so, then even with adding CSS-padding attributes with id="" 's, IE ADDS the padding-bottom to make to 10px now.

 

How can I make it so that the pre boxes in Internet Explorer and Firefox(which seems to be okay already) appear ONLY 5px apart from each other vertically?

 

Latest Firefox/Internet Explorer

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/97014-internet-explorer-and-tags-positioning/
Share on other sites

unfortunately, I'm designing it on a local server.

 

Since Firefox displays the pre's normally, with and without css attributes, and IE does the same, but with the +5px margin, I was assuming that this was yet another of IE's standard horrible rendering quirks.

 

Currently, my only method around this is to use the (flawed) method of using PHP to find the browser type, and if it's internet explorer, to alter the CSS editing for that page.  But I'm hoping that there's a purely css resolution to this, as I like to keep any function calls to a minimum.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.