Ugh, so why isn't this working in IE?

Auryg

Platinum Member
Dec 28, 2003
2,377
0
71
echo '<span style="font-size:13px; font-family:Arial, sans-serif; position:relative; top:-8px;">';
echo $gamedesc;
echo '</br>';
echo '</span>';
echo '<span style="display:inline;">';
echo '<div style="float:left; font-size:11px; font-family:Arial, sans-serif;">';
echo 'Rating: ';
echo round($rating, 2);
echo '</div>';
echo '<div style="float:right; font-size:11px; font-family:Arial, sans-serif;">';
echo 'Added: ';
echo date("M j, Y", $dateadded);
echo '</div>';
echo '<div style="text-align:center; font-size:11px; font-family:Arial, sans-serif;">';
echo 'Played: ';
echo $timesplayed;
echo '</div>';
echo '</span>';

Both the left and right divs just aren't showing up. Any ideas? I'm sort of an HTML noob, but it works in both Chrome and Firefox just dandy.
 

troytime

Golden Member
Jan 3, 2006
1,996
1
0
i can't help with the css because i suck at it. but i can help you make your code more readable.
break out of php.

?>
<span style="blah blah">
<?=$gamedesc;?>
<br>
</span>
<span style="blah blah">
<div style="blah blah">
Rating: <?=round($rating, 2);?>
</div>
<div style="blah blah">
Added: <?=date("M j, Y", $dateadded);?>
</div>


also, </br> isn't right. should be <br> or <br />
 

Aluvus

Platinum Member
Apr 27, 2006
2,913
1
0
It would make life easier if you posted the markup that the browser is actually seeing, after your server grinds through the PHP.
 

Auryg

Platinum Member
Dec 28, 2003
2,377
0
71
Originally posted by: Aluvus
It would make life easier if you posted the markup that the browser is actually seeing, after your server grinds through the PHP.

I would but I can't figure out how - this is a page that responds to ajax calls, and is displayed in a popup. Troytime - thanks, that probably is a much better idea, heh.
 

Hmongkeysauce

Senior member
Jun 8, 2005
360
0
76
Originally posted by: Auryg
Originally posted by: Aluvus
It would make life easier if you posted the markup that the browser is actually seeing, after your server grinds through the PHP.

I would but I can't figure out how - this is a page that responds to ajax calls, and is displayed in a popup. Troytime - thanks, that probably is a much better idea, heh.

Page->View Source for IE
View->Page Source for Firefox
 

Auryg

Platinum Member
Dec 28, 2003
2,377
0
71
Originally posted by: Hmongkeysauce
Originally posted by: Auryg
Originally posted by: Aluvus
It would make life easier if you posted the markup that the browser is actually seeing, after your server grinds through the PHP.

I would but I can't figure out how - this is a page that responds to ajax calls, and is displayed in a popup. Troytime - thanks, that probably is a much better idea, heh.

Page->View Source for IE
View->Page Source for Firefox

Thanks, but that won't work. Firebug was able to nab the ajax response though -


<span style="font-size:13px; font-family:Arial, sans-serif; position:relative; top:-8px;">Description</br></span>
<span style="display:inline;">
<div style="float:left; font-size:11px; font-family:Arial, sans-serif;">Rating: 9</div>
<div style="float:right; font-size:11px; font-family:Arial, sans-serif;">Added: Jun 11, 2009</div>
<div style="text-align:center; font-size:11px; font-family:Arial, sans-serif;">Played: 97</div></span>
 

Hmongkeysauce

Senior member
Jun 8, 2005
360
0
76
Some things:
1. </br> is an invalid tag. Do you mean to put <br /> ?
2. You cannot legally put a block element(<div>) inside an inline element(<span>). Generally speaking, only other inline elements can go inside inline elements whereas almost any elements can go inside block elements.
3. <span> already defaults to display: inline, so that style is not needed.
4. Everything is rendering in IE 8 and FireFox 3 from my end.

I'm not a CSS/HTML expert. Those are just some of my observations from past experiences. Others, please correct me if I'm wrong.
 

Auryg

Platinum Member
Dec 28, 2003
2,377
0
71
Alright, thanks for all the help. I fixed my code mistakes, but I still couldn't figure out how to get them to space correct/show up in IE7. So, when all else fails: absolutely position. Haha.