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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.