Jump to content

IE8 website problem


Scorpion
 Share

Recommended Posts

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 ;)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

   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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...