Forum Moderators: not2easy

Message Too Old, No Replies

Paragraph format breaks in IE

...but is fine in FireFox

         

Storyman

6:54 am on Apr 5, 2005 (gmt 0)

10+ Year Member



The site is center column using CSS. The paragraphs are left aligned within the center column. For some reason the formatting sometimes breaks in IE so that the paragraph is no longer within the center column and instead is flush left of the viewport.

Here is the CSS code used:

body {
margin: 0;
padding: 0px;
height: auto;
color: Black;
}
#container {
margin: 0px;
padding: 0px;
background-image: url(images/paper-rpt.jpg);
background-repeat: repeat-y;
background-position: center;
}
.separator {
background-image: url(images/paper-tp-bt.jpg);
background-repeat: no-repeat;
background-position: center;
height: 91px;
}
.content p{
margin: 0px;
padding: 0px 0px 8px;
}
.content {
padding-bottom: 20px;
padding-top: 20px;
width: 490px;
padding-left: 50%;
margin-left: -225px;
}
h2 {
text-align: center;
width: 500px;
padding-left: 50%;
margin-left: -270px;
vertical-align: middle;
font-size: xx-large;
}

I'm not sure if the PHP code matters, but in case it has some bearing here it is:

//Display content

if (!empty($recordset[$heading])) {
?><div class="separator">&nbsp;</div><h2><?PHP
echo nl2br($recordset[$heading]) . "</h2>"; }

if (!empty($recordset[$paragraph])) {
?><div class="content">&nbsp;<p><?PHP
echo nl2br($recordset[$paragraph1])."</p></div>";}

Viewing the source when the page is displayed doesn't reaveal anything unusual.

There isn't any problem when displayed in FF.

At this point I'm not sure what to focus on since it works most of the time in IE, but breaks at the same point (so the text becomes flush left in the viewport).

Could something be happening with the IE cache?

Storyman

7:46 am on Apr 5, 2005 (gmt 0)

10+ Year Member



I've discovered that resizing the IE browser will make the errant paragraphs to realign correctly!

Refreshing the browswer has no apparant effect--only resizing.

How can IE be forced to let the page download completely into cache before displaying?

Storyman

6:56 pm on Apr 5, 2005 (gmt 0)

10+ Year Member



This morning I looked at the web site in question with a friend's computer. Turns out FF displayed the same problem as IE did on my machine.

The good news is that if the browser is resized it will reformat the paragraphs so they align correctly inside the center column.

Still haven't figured out why when the page first displays some of the paragraphs will break and instead of displaying inside the center column they display flush left on the edge of the browser.

Any help is greatly appreciated.