Click here to Skip to main content
15,889,751 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I have the following code applied to the top header (includes top header banner and menu):
XML
<div style="position:fixed; z-index:1; background-image:url(/images/portlet/icon_base_strip.jpg); 
top: 0px; width: 1025px;  right: 117px; height:21px; " align="center" >


Its working fine with Firefox and IE8, but with IE6 the header table is pushed to the left side, as its left aligned

Please guide on fixing this as my launch of the site will be next Friday, and i dont want to get fried...
Posted
Updated 21-Jan-10 7:01am
v5

The problem is that you are not setting a value for the left margin.

"align="center" is just setting the alignment for text not the div.

This would be a sample css class that would work.

CSS
.myClass
{
    width: 1025px;
    height: 21px;
    margin: 0 auto;
}


Is there any reason why you are not separating the style into a css stylesheet? It's really poor practise not doing so.
 
Share this answer
 
v2
But when i use this class, it will effect on other browsers,
then IE6 is OK, but IE7,IE8 firefox, goes bad.
 
Share this answer
 
Are you saying that the class I suggested does break the layout on Firefox etc or that it will?

The class I suggested was design to center a div of fixed width of 1025px on your page. Was that what you wanted?

The class would normally work on all browsers. Perhaps if you posted more html I could figure out what else is causing layout problems.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900