Why wont this work in IE!?!?!?

by 0oo0
3 replies
ok im learning how to hand code my sites now BUT I can't figure out why this wont work in Internet Explorer.

****
here is my css:




#wrap
{
position:relative;
width:960px;
height:600px;
margin:auto;
background-color:white;
}

body
{
background-color:red;
}

#col1
{
width:320px;
height:250px;
border:1px solid black;
}

#col2
{
position:absolute;
top:0px;
left:320px;
width:320px;
height:250px;
border:1px solid black;
}

#col3
{
position:absolute;
top:0px;
left:640px;
width:320px;
height:250px;
border:1px solid black;
}

#col4
{
position:absolute;
top:350px;
width:320px;
height:250px;
border:1px solid black;
}

#col5
{
position:absolute;
top:350px;
left:320px;
width:320px;
height:250px;
border:1px solid black;
}

#col6
{
position:absolute;
top:350px;
left:640px;
width:320px;
height:250px;
border:1px solid black;
}


*********
here is the html:

i have a declared doctype too


<html>
<head>
<link rel="stylesheet" type="text/css" href="n1.css"/>

</head>
<body>

<div id="wrap">

<div id="col1">
<p>Here is col 1</p>
</div>

<div id="col2">
<p>Here is col 2</p>
</div

<div id="col3">
<p>Here is col 3</p>
</div

<div id="col4">
<p>Here is col 4</p>
</div

<div id="col5">
<p>Here is col 5</p>
</div

<div id="col6">
<p>Here is col 6</p>
</div


</div>


</body>
</html>
#work
  • Ok .... what doesnt work?
    {{ DiscussionBoard.errors[4077958].message }}
  • Profile picture of the author ussher
    in order to not confuse IE, i find if you keep margin/padding and width/height assigned to different things IE seams to vaguely understand.
    Signature

    "Jamroom is a Profile Centric CMS system suitable as a development framework for building entire communities. Highly modular in concept. Suitable for enterprise level development teams or solo freelancers."

    - jamroom.net
    Download Jamroom free: Download
    {{ DiscussionBoard.errors[4079243].message }}
  • Profile picture of the author danieljames123
    Instead of using float, why don't you use:
    ul li {
    display: inline;
    }
    Then you can chose whether or not to specify a width and add margins & padding on the anchor tags to separate the items, and they will be places beside each other rather than having a line break in between them.
    {{ DiscussionBoard.errors[4080188].message }}

Trending Topics