Output problem in Firefox

liunx

Guest
This is one of several problems I am having (the others are HTML) where Firefox is outputting what appears to be perfectly valid markup in a very invalid way. In this case the <div> is not misaligned, although the top border seems to be, but the text within the <div> is very much out of alignment.

The applicable css:

.cbox {
margin: 0 auto;
position: relative;
text-align: left;
background-color: transparent;
}
.cleft {
text-align: left;
float: left;
background-color: transparent;
}
.cright {
float: right;
text-align: left;
clear: right;
background-color: transparent;
}

The output is generated by PHP, thus the single quotes:

<div class='cbox' style='width:600px; margin-top: 5px'>
<div class='cright' style='width:300px; font-size:12pt; color: #000000'>
Tlr, Tamu #0202
</div>
<div class='cleft' style='width:295px; font-size:12pt; color: #000000'>
<b>MFCU</b>, Mira Mesa:
</div>
</div>
<div class='cbox' style='width:600px; border-top: 1px solid #000000;'>
06/02/05 02:05 pm <span style='color:#910000'>Olive skinned male, 20's, etc</span>
</div>

IE displays this properly, with a line between the first line and the date/description below it. Firefox shows the line above the upper <div> but all of the text in the lower one is displayed properly below. In the lower <div> the first line of text is pushed about 300px to the right (the description usually wraps to at least two lines). The beginning of the second line in that <div> is at the left margin, so the <div> itself seems to be the proper dimension.

What can cause Firefox to align the div okay and trash the contents like this?

(Well, why is the border too high?)got link?Unfortunately, no. The output is a db report. It's transitory and is part of a proprietary system. Fortunately, my client uses IE and the output works in IE. But it bugs me that Firefox doesn't, since IE is buggy and Firefox does css right.Can not debug the problem without complete HTML code. You could save the dynamic page as HTML and post it...Okay, you can see it here (<!-- m --><a class="postlink" href="http://www.sonora-sw.com/eight/o_review.htm">http://www.sonora-sw.com/eight/o_review.htm</a><!-- m -->) and the css files here (<!-- m --><a class="postlink" href="http://www.sonora-sw.com/eight/reports.css">http://www.sonora-sw.com/eight/reports.css</a><!-- m -->) and here (<!-- m --><a class="postlink" href="http://www.sonora-sw.com/eight/bassco.css">http://www.sonora-sw.com/eight/bassco.css</a><!-- m -->).<div class='cbox' style='clear:both; width:600px; border-top: 1px solid #000000;'>Also you can not really complain about layout bugs when you put browser in the buggy mode. Use Strict DTD.Fang, you have done it again. You must have been at this a while. Or you are very smart. Or both.

It never ceases to amaze me the effect that the preceeding div can have. For the float of the preceeding div to affect this one in that fashion (moving the boundary up but not aside and just one line of the the contents aside) is truely amazing. Someday I would like to meet the people who engineered this product, but only when I have a gun in my pocket.

Vladdy, thanks for your point. I thought I had changed that one back. But as it happens it doesn't look like it was the cuplrit in ths case. It well could have been tho.

The people in this forum are always helpful, to the point, critical only in a constructive manner, and never in useless "put down" mode. Nice place.
 
Back
Top