• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

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

Auryg

Platinum Member
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.
 
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 />
 
It would make life easier if you posted the markup that the browser is actually seeing, after your server grinds through the PHP.
 
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.
 
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
 
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>
 
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.
 
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.
 
Back
Top