Jump to content


Photo

my site code... wont work well with I.E?


  • Please log in to reply
5 replies to this topic

#1 Havenot

Havenot
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 11 September 2006 - 09:02 AM

if u goto http://www.kadafilegacy.com

in I.E you will see that the site's content area... the middle section between the header and footer is aligned to the right... where as in Firefox the site is perfect...

since more users use I.E on my site than firefox i need it sorting...

im sure u all kno how 2 read my code of the site... if someone could look through it and maybe find the problem id b grateful.. i just dunno what it could be  ???

#2 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 11 September 2006 - 10:50 AM

There are A LOT of errors in the html....

go here http://validator.w3.org and fix them; that will be a huge step in solving your problems...
follow me on twitter @PHPsycho

#3 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 11 September 2006 - 11:04 AM

Its mainly to do wit your CSS. It is not a good a idea to use positioning when doing a CSS layout, especially when you're trying to center a layout. it is best to use auto margins.

The following is your new CSS:
body {
    background-color: #666666;
    color: #FFF;
    font-size: 12px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
} 

a:link, a:visited, a:hover, a:active {
    color: #FFF;
}

#container {
    width: 707px;
    margin: 0px auto;
}

#head {
    width: 707px;
}

#head img {
    display: block; 
}

#box1 {
    width: 345px;
}

#content {
    width: 697px;
    text-aligh: justify;
    background-color: #2D3855;
    padding: 5px;
}

#quote {
    width: 697px;
    text-aligh: justify;
    background-color: #2D3855;
    padding: 5px;
}

#foot {
    width: 707px;
    font-size: 9px;
    text-align: center;
}
Also you'll want to add to add:
<body>
<div id="container">
before:
</head>
and you'll want to put:
</div>
before:
</body>

In your HTML.

Another thing you'll want to do is clean up your html code by removing the font tags, center tags. Extra line break tags (<br>) use padding/margins instead rather than adding masess of line breaks to pad out areas etc.

#4 Havenot

Havenot
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 11 September 2006 - 04:32 PM

thanks... i changed the css and the added bits of code u told me to...

i haven't changed the html errors yet... will get onto that, but wanted 2 make sure before i go further if the html errors r causing the problem with the page now...

in firefox it's aligned all to the left... and in I.E the content is centered but the header is not  :-\

wondering if it might b the changes i just made...

#5 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 11 September 2006 - 04:43 PM

In your HTML change
<body>
<div id="container">

</head> 

</center>
</div></td>
To this:
</head>
<body>
<div id="container">

You'll also want to fix up the HTML issues I suggested too.

#6 Havenot

Havenot
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 11 September 2006 - 07:23 PM

thanks!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users