| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
-------------------> Boo!
|
Title: PLZ HLP! IE/PC hates my CSS!?! Why?? Oh man... why did god ever invent Internet Explorer? Anyway, my site CSS layout works fine on every major browser (mac/pc) except for all versions of IE on PC! Grr, I do not understand why... all of my code is valid XHTML 1.0 trans... and my style sheets are valid... Could someone/GURU/anyone please check my code and give me some feedback? Here is link to test template page (Using same code as below): http://www.ambiguism.com/test/ And here is the source code for above test template: [code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>CSS TEST TEMPLATE DOC</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> <!-- body { font-smooth: never; background-color: #111111; margin: 0px; padding: 0px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 60%; font-style: normal; line-height: 1.5em; font-weight: normal; font-variant: normal; color: #666666; text-decoration: none; text-transform: none; letter-spacing: 2px; line-height: 1.5em; background-attachment: scroll; background-image: url(bkgrnd.gif); background-repeat: repeat-x; background-position: 0px 0px; } #container { width: 850px; padding: 0px; margin-top: 50px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; } #flash_banner { padding: 0px; height: 250px; width: 800px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 5px; border-top-style: solid; border-top-color: #000000; border-right-width: 50px; border-right-style: solid; border-right-color: #000000; border-bottom-style: none; border-bottom-width: 0px; border-bottom-color: #000000; border-left-width: 0px; border-left-style: none; border-left-color: #000000; } #banner { margin: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 250px; background-color: #000000; background-attachment: scroll; background-image: url(rounded_crnr.gif); background-repeat: no-repeat; background-position: right bottom; } #shadow_banner { margin: 0px; background-attachment: scroll; background-image: url(tp_grndt.gif); background-repeat: no-repeat; background-position: left top; padding: 0px; height: 11px; } #innercontentwrap { width:99.9%; float:left; } #content { margin-left: 257px; margin-right: 50px; margin-top: 0px; margin-bottom: 0px; padding: 0px; } #sidebar-a { float: left; width: 200px; padding: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 50px; } #footer { clear: both; padding-top: 30px; padding-right: 0px; padding-bottom: 5px; padding-left: 250px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; } img { border:0; } p { margin: 0; } div.thumbs65 { float:left; width: 99.9%; margin-top: 0; margin-right: 0; margin-bottom: 10px; margin-left: 0; } .l_fl { float:left; display: block; border:0; padding-right: 10px; } .under_p6 { margin-top: 6px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; } .img_border { border: 1px solid #000000; } .sub_page { font-size: xx-small; text-align: right; } /* Links have to be in this order in your stylesheet: a:link a:visited a:hover a:active */ a:link { color: #999900; text-decoration: none; } a:visited { color: #999900; text-decoration: none; } a:hover { color: #CCCC00; text-decoration: none; } a:active { color: #FFFF00; text-decoration: none; } a.current { color: #666600; text-decoration: none; } a.current:hover { color: #CCCC00; text-decoration: none; } --> </style> </head> <body> <!-- BEGIN DIV "CONTAINER" /////////////// --> <div id="container"> <!-- BEGIN DIV "FLASH_BANNER" /////////////// --> <div id="flash_banner"> <object classid="clsid <param name="movie" value="6.swf" /> <param name="quality" value="high" /><param name="BGCOLOR" value="#666666" /> <embed src="6.swf" width="800" height="250" hspace="0" vspace="0" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#666666"></embed> </object> </div> <!-- END DIV "FLASH_BANNER" /////////////// --> <!-- BEGIN DIV "BANNER" /////////////// --> <div id="banner"> <a href="#" title="[Home]">Home</a> <a href="#" title="[News]">News</a> <a href="#" class="current" title="[Folio]">Folio</a> <a href="#" title="[Resume]">Resume</a> <a href="#" title=" Code:
I would love some help... ugh, why does IE have to be such a pain in the ****? Many many thanks in advance... Cheers Micky Last edited by mhulse : 27-10-2004 at 22:29. Reason: Forgot to subscribe! Ack! |
|
|
|
|
|
#2 (permalink) |
|
Registered User
Join Date: Oct 2004
Location: London, UK
Posts: 16
|
Change: div.thumbs65 { float:left; width: 99.9%; margin-top: 0; margin-right: 0; margin-bottom: 10px; margin-left: 0; } to div.thumbs65 { clear:both; width: 99.9%; margin-top: 0; margin-right: 0; margin-bottom: 10px; margin-left: 0; } and : #innercontentwrap { width:99.9%; float:left; } to #innercontentwrap { width:500px; float:left; } *500px is the first number I tried, play around with it to see what the max it can take is* That fixes it in IE6, IE5.5 and IE5.01 on PC - and still looks OK FF, but can't test on Mac. Matt Last edited by templeGreen : 27-10-2004 at 23:26. |
|
|
|
#3 (permalink) |
|
-------------------> Boo!
|
Many thanks for looking my code over templeGreen! I really appreciate you taking the time to help me out... changing my code now... Quick question, what are your thoughts on using a box model hack (for IE/Win)? I ask this because I usually get my base CSS layouts from inknoise (the form has has the option to create the IE/Win box model hack): http://www.inknoise.com/experimental/layoutomatic.php ... Could the hack help also? Anyway, thanks again for your help! I can't thank you enough! Cheers Micky |
|
|
|
#4 (permalink) |
|
vague™
Join Date: Mar 2004
Location: Glasgow
Posts: 5,126
|
the box model hack is a valid, and occasionally necessary, technique but it is possible to avoid it by simply not setting border and/or padding on a block level element which has a width value. in most cases you can get around this by adding another block level element inside this one and add the border/padding to that, although this could of course result in non-semantic code.. stick with the bmh for now, it does the job |
|
|
|
#6 (permalink) | |
|
vague™
Join Date: Mar 2004
Location: Glasgow
Posts: 5,126
|
Quote:
Each to their own and everything, but surely you've got that the wrong way round? The most logical development method is to author your code for firefox (or another browser which follows web standards) and then hack/change for IE/non-standards browsers accordingly |
|
|
|
|
#8 (permalink) | |
|
Senior Member
Join Date: Feb 2004
Location: Exeter
Posts: 778
|
Quote:
http://www.w3schools.com/css/pr_class_clear.asp |
|
|
|
|
#10 (permalink) | |
|
Senior Member
Join Date: Feb 2004
Location: Exeter
Posts: 778
|
Quote:
Because IE doesn't render CSS properly If some of your clients use NN, test in that first You don't wanna end up with dodgy code |
|
|
|
|
#13 (permalink) |
|
vague™
Join Date: Mar 2004
Location: Glasgow
Posts: 5,126
|
Yeah, I meant it's best to author in a browser that renders properly, as that way you'll get into the habit of producing proper, valid, well-structured code which you can then modify for compatibility in the shit browsers such as IE. Developing and testing in IE is fine if you know your target audience (e.g. intranet users) will be using that particular browser, but trying to use your way of working when producing sites that need to be as accessible as possible (e.g. display the same on Opera, Firefox, IE, Safari, IE/Mac, etc) is a sure way of giving yourself as much grief as possible, and it will most likely also have a knock-on effect on the quality of your code. |
|
![]() |