Scorpion Posted January 27, 2010 Share Posted January 27, 2010 Right well the website link is zombiepcs and the images work in firefox and IE7 (havent got any others to test) but in IE8 the images are missing but the code is still there in the source and this is with IE8 just installed so not addons or blockers. I am using a CSS and php but have no idea why its not displaying the images. please help hak5 fans ;) Quote Link to comment Share on other sites More sharing options...
digip Posted January 27, 2010 Share Posted January 27, 2010 Possibly the css has a syntax error, but th eother browsers render it anyway. People fault IE for its lack of standards, but in reality, a lot of times bad syntax will break IE, and people dont bother to debug and work around it. Havent looked at it yet, but I'll have a look later and see if I can see anything. Double check that all your lines have ending semicolons, brrackets, etc, in the css, and if you are using any kind of container divs, IE likes them to have widths and display settings to things like display:table; table-layout:fixed; What that does, is make sure anything inside the div, gets fully wrapped with whatever the div is. This also helps when using floats because the content inside the div will force the div to stretch to the inner contents, instead of sliding out of the div. CSS passes validation, but that doesnt mean there isnt something out of whack though. http://jigsaw.w3.org/css-validator/validat...g=1〈=en Quote Link to comment Share on other sites More sharing options...
Scorpion Posted January 27, 2010 Author Share Posted January 27, 2010 well i had a look in the CSS and every line with writing has got ; on the end but i can see why i would fault IE8 as its the only browser with the problem but hopefully we can get it fixed. Quote Link to comment Share on other sites More sharing options...
digip Posted January 27, 2010 Share Posted January 27, 2010 I noticed you have a clear set in a few elements that have no float specified. Clear is only used with floats. edit:what images dont show up in IE8? I see the same thing in Opera that I see in IE. Quote Link to comment Share on other sites More sharing options...
digip Posted January 27, 2010 Share Posted January 27, 2010 I see th eproblem. Its not CSS. Its HTML. You left the <a href= tags open in the links page around th eimages. Syntax is broken. <a href=/ccount/click.php?id=1 <img src=/links/1/picture.gif class=image /></a> should be: <a href="/ccount/click.php?id=1"><img src="/links/1/picture.gif class=image" /></a> Quote Link to comment Share on other sites More sharing options...
Scorpion Posted January 27, 2010 Author Share Posted January 27, 2010 i didnt know Opera was doing it aswell thank you but i have made those changes and it still doing it could it be this little script Print "<div class='post'>"; Print "<h3>"; include("links/".$id."/title.txt"); Print "</h3>"; Print "<h4><strong>"; include("links/".$id."/info.txt"); Print "</strong></h4>"; Print '<p> <a href="/ccount/click.php?id='.$id.'"'; $file = "/home/fhlinux130/z/zombiepcs.co.uk/user/htdocs/links/".$id."/picture.png"; if (file_exists($file)) { Print ' <img src="/links/'.$id.'/picture.png" /></a></p>'; } else { Print ' <img src="/links/'.$id.'/picture.gif" /></a></p>'; } Print "<p>"; include("links/".$id."/information.txt"); Print "</p>"; Print "</div>"; I'm sure that its messy but you never know the problem could be here for some reason but i dout it. Quote Link to comment Share on other sites More sharing options...
digip Posted January 27, 2010 Share Posted January 27, 2010 Print "<div class='post'>"; Print "<h3>"; include("links/".$id."/title.txt"); Print "</h3>"; Print "<h4><strong>"; include("links/".$id."/info.txt"); Print "</strong></h4>"; Print '<p> <a href=\"/ccount/click.php?id='.$id.'\"'; $file = "/home/fhlinux130/z/zombiepcs.co.uk/user/htdocs/links/".$id."/picture.png"; if (file_exists($file)) { Print ' <img src=\"/links/'.$id.'/picture.png\" /></a></p>'; } else { Print ' <img src=\"/links/'.$id.'/picture.gif\" /></a></p>'; } Print "<p>"; include("links/".$id."/information.txt"); Print "</p>"; Print "</div>"; you need to escape the double quotes \" Why are you doing it this way, with php, instead of just 1 line in html? Seems overkill. You cna do html in php document,s just need to end the php tag before the html, and begin it again when more php code is needed. Quote Link to comment Share on other sites More sharing options...
Scorpion Posted January 27, 2010 Author Share Posted January 27, 2010 i've only learned php from doing simple scripts and looking at code as thats how i learned VB and vb.net 05 but i tried the \" and it stopped working in firefox so i've removed them (wasnt working in IE8) i thought it was over kill but it worked in the browser i was testing so i never saw this bug for a month or 2 even when i had people go on the site it all worked fine. I will rework the php script as that seems to mess something up. That code is inside a loop thats the reason i thought it had to have Print each time. Quote Link to comment Share on other sites More sharing options...
Scorpion Posted January 27, 2010 Author Share Posted January 27, 2010 i have fixed it here's the code <? $id = "1" ?> <? $limit = "6" ?> <? do { ?> <div class='post'> <h3> <? include("links/".$id."/title.txt"); ?> </h3> <h4><strong><? include("links/".$id."/info.txt"); ?></strong></h4> <p> <a href="/ccount/click.php?id=<? Print($id); ?>"> <? $file = "/home/fhlinux130/z/zombiepcs.co.uk/user/htdocs/links/".$id."/picture.png"; ?> <? if (file_exists($file)) { ?> <img src="/links/<? Print($id);?>/picture.png" /></a></p> <? } else { ?> <img src="/links/<? Print($id);?>/picture.gif" /></a></p> <? } ?> <p> <? include("links/".$id."/information.txt"); ?> </p> </div> <? $id += 1; ?> <? } while ($id < $limit); ?> Its still messy but hey it works in IE8 and i didnt know i could still loop even when i have closed the php script Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.