PDA

View Full Version : My layout is only compatible in Internet Explorer?



Koala
Sep 24th, 2010, 12:51 AM
http://www.jenna.cookied.org/test

It's under construction. Works perfectly in internet explorer 7. Does not work with Firefox or Chrome? Can anyone help me with this?

rvincenten
Sep 24th, 2010, 01:08 AM
Apply valid source code, that's all I can say ;) You have the head element within your style element, and you are missing the html opening tag and body tag, and also the DTD.

Also, the server is sending a content-type of text/plain, which would explain the fact that you have named your page "test" as opposed to "test.html", and because of that, firefox/chrome/safari know this is a text file, not a HTML file. And that means IE is at fault.

One of your div tags is also unclosed. And you can also make it easier on yourself with proper indenting :).

<!DOCTYPE html>
<html lang="en">
<head>
<title>Koalasong</title>
<style type="text/css">
body{
cursor:crosshair
}

#img {
top:0px;
left:0px;
position:absolute;
}

#main {
position: absolute;
width: 389px;
height: 270px;
top:186;
left:163;
}
</style>
</head>

<body>
<div id="img">
<img src="http://i51.tinypic.com/1jm6mq.jpg" alt="">
</div>

<div id="main">
.
</div>
</body>
</html>

Koala
Sep 24th, 2010, 03:03 AM
Oh, okay, thank you!! :)

Major Payne
Sep 24th, 2010, 08:06 AM
Your browser is outdated. Use IE 8 which allows you to change compatibility modes. Also, IE 9 beta is available.

NEVER design your pages to IE. Too many BUGS (http://www.positioniseverything.net/explorer.html). Use another browser that is compliant like Firefox or Opera. Then use a proper document type and a separate CSS for IE. Call the IE only CSS with IE's conditional comments (http://msdn.microsoft.com/en-us/library/ms537512.aspx).