Forum Moderators: not2easy

Message Too Old, No Replies

Fixing Code Difference in FF and IE

         

Saboi

9:06 am on Sep 21, 2008 (gmt 0)

10+ Year Member



Hello guys,

I am still having problems with how my site looks in IE. It looks OK in FF. Where could i be getting it wrong? Thanks guys, please come throough...

The code is as below,

<html>

<head>

<title>Testing CSS</title>

<style type="text/css">

#container{width:80%; height:100%;}

#header{width:100%; height:25%; background-image:url(image.jpg); background-color:blue; border-bottom:double thin blue;}

#menu{width:20%; height:100%; background-color:pink; border-right:double thin blue; border-left:double thin blue; float:left;}

#center{width:75%; height:100%; background-color:white; float:left;}

#right{width:4%; height:100%; background-color:yellow; float:right; border-right:double thin blue;}

#footer{width:100%; height:5%; background-color:blue; clear:both;}

.menu a{display:block; background-color:blue; text-decoration:none;}

.menu a:hover{display:block; background-color:white; text-decoration:none;}

.menu a:visited{display:block; text-decoration:underline;}

body{background-color:gray;}

h2{text-align:right;}

span{background-color:#3BB9FF;}

</style>

</head>

<body>

<center>

<DIV id="container">

<DIV id="header"></DIV>

<DIV id="menu">

<p class="menu"><a href="#">Menu1</a>

<p class="menu"><a href="#">Menu2</a>

<p class="menu"><a href="#">Menu3</a>

<p class="menu"><a href="#">Menu4</a>

<p class="menu"><a href="#">Menu5</a>

<p class="menu"><a href="#">Menu6</a>

<p class="menu"><a href="#">Menu7</a>

<p class="menu"><a href="#">Menu8</a>

<p class="menu"><a href="#">Menu9</a>

<p class="menu"><a href="#">Menu10</a>

<p class="menu"><a href="#">Menu11</a>

<p class="menu"><a href="#">Menu12</a>

<p class="menu"><a href="#">Menu13</a>

</DIV>

<DIV id="center">

<p><h2>Home</h2>

<p>Welcome!

</DIV>

<DIV id="right"></DIV>

<DIV id="footer"></DIV>

</DIV>

</center>

</body>

</html>

dreamcatcher

3:13 pm on Sep 22, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What exactly is the problem? Is it the way the paragraphs are displaying? IE auto pads p tags, so you should always set the default to padding:0. Same as many block level elements.

p,h2,blockquote,form {
padding:0;
margin:0;
}

etc etc

Then style on a per area/tag basis.

dc

Saboi

10:48 pm on Sep 23, 2008 (gmt 0)

10+ Year Member



Hello Dreamcatcher,

The problem is that my code does not adhere to the "heights" set as is the case with FF.

Any idea how i can go round this?

Thanks