problem in IE 6

wilbo

New Member
Hi everyone

Ive got a problem with a site I'm making.
I've made it so that it sits in the center of the page. To do this I've put everything inside a <div align="center">.

It all works fine in Firefox and IE 7 but in IE 6 I have an annoying problem.
The page loads fine first time but if you click on a link everything suddenly moves to the left and stays there.
The wierd thing is that if you click it again it goes back to the middle!

Please can someone tell me what the heck is going on and how to fix it.

Thanks
 

ssksri

New Member
problem in IE 6 (Solution)

hi,

First give all pages body tags (leftmargin, topmargin) and after take alignment.

regards.
SSK
 

josevel

New Member
Hi,

you might center your layout by defining the following class in your css style sheet:
#position_center {
width:YOUR_PREFERRED_WIDTHpx;
margin-left:auto;
margin-right:auto;
}

.....................

Later use it in your HTML code:
.....
<body>
<div id="position_center">
<!-- The rest of your HTML goes here -->
</div>
</body>
</html>


Basically, you need to use a div container to center your layout. It works fine in IE as well

Regards,
josevel
 

The Lion

New Member
I Can See It Already: It's Something Small...

You could also skip the alignment in the <div> tag and simply use <td align="center">, aligning everything within the cell. First, however, I'd check to make sure that you closed your <div> tag properly. Sometimes open <div> tags can create strange browser behavior as the browser sifts through consecutive lines looking for the close.

Ultimately, however, IE 6 has no issues with <div> tags. So it must be a coding slip-up. Please give us a link so we can check it out. Otherwise, we're just shooting in the dark. Be sure to take another peek at your lines before you do, however, as I do believe it's just a little oversight on your part.

Good luck, friend,
The Lion.
 
Last edited by a moderator:
Top