Link to home
Start Free TrialLog in
Avatar of Perkdaddy
Perkdaddy

asked on

What is causing my site to appear inproperly in IE

I need a little help from my fellow experts. I'm at a loss on this one. usually when I design sites I have absolutely 0 problem making the site work perfectly in across all browsers. but my new site gamblingdomainnames.com keeps appearing incorrectly in IE. I cant narrow down the culprit. Is it javascript? If someone could have a look at my page source and point me in the right direction, I would be very obliged.
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Center isn't a valid float value: <div style="float:center ;">.  And some of your '&nbsp;' don't have the';' after them like '&nbsp&nbsp&nbsp'.  And your page doesn't validate and some of the errors really do need to be fixed.
Avatar of Perkdaddy
Perkdaddy

ASKER

Ok so How do I fix it?

You say invalid float value, so what is the correct code?

After I had a freelancer create some columns for me this all started to happen, especially ALL those &nbsp
ASKER CERTIFIED SOLUTION
Avatar of Daemon_Byte
Daemon_Byte

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
so this is correct? With SO many errors I have 2 choices, sit in the bathroom all day crying, or ATTEMPT to locate where all the code create the index page and sort through the bazzilion lines of code to validate, but hey, thats the job...

<?php }
if(!$vmMinicart) { ?>
    <hr style="clear: both;" />
<?php } ?>
<div style="float: left;" >
<?php echo $total_products ?> &nbsp&nbsp&nbsp;
</div>
<br />
<div style="float:right;">
<?php echo $total_price ?>
</div>
<?php
echo $saved_cart;
?>
yes and no. It's never a good idea to float a div without putting a width on it because browsers will act up otherwise. It's also a good idea to wrap left and right divs into another floating div so other floating objects don't get in the way. So something like this would be better. (change the widths to suit you)

<?php }
if(!$vmMinicart) { ?>
    <hr style="clear: both;" />
<?php } ?>
<div style="float: left;width: 100%" >
<div style="float: left;width: 600px" >
<?php echo $total_products ?> &nbsp&nbsp&nbsp;
</div>
<br />
<div style="float:right; width: 200px">
<?php echo $total_price ?>
</div>
</div>
<?php
echo $saved_cart;
?>
And if you just want them side by side with any spare white space on the right not in between them you can change the float right to float left. They will still float side by side as long as the widths allow it.
Yeah but this is for the shopping cart that appears on the top right. So why would I float left?
Floating left doesn't mean it will appear on the left. It just means it will float on the left of the object in front of it. Ie

[floating 100% wide                                                                              ]
| floating left  x pixels| | floating left  y pixels|  --unused white space--

[floating 100% wide                                                                              ]
| floating left  x pixels| --unused white space-- | floating right  y pixels|


I was just letting you know it was an option although I'm not sure in this case it would apply.
This is a nightmare! Thanks for your help. I will go hire someone to clean the site up. It doesnt even display AT ALL in IE8, problem was I was using IE7 and didnt notice anything out of wack...
Rarely a good idea to develop in Ie. Firefox with firebug or Opera with it's dragonfly is usually the best. I prefer the latter but most prefer the first. Good luck with it :)