网站顶部标头已固定,带有滚动体,IE8和IE6调整 [英] Site top header fixed with scrolling body, IE8 and IE6 adjustments

查看:77
本文介绍了网站顶部标头已固定,带有滚动体,IE8和IE6调整的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我将以下代码应用于顶部标题(包括顶部标题横幅和菜单):

Hi all,

I have the following code applied to the top header (includes top header banner and menu):

<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" >



它可以在Firefox和IE8上正常工作,但在IE6上,标头表被推到左侧,因为它的左对齐

请指导解决此问题,因为我的网站将于下周五启动,我不想被炒...



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...

推荐答案

问题是您不是设置左边距的值.

"align =" center只是设置文本的对齐方式,而不是div.

这将是一个示例CSS类,该类将起作用.

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.

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



有什么理由不将样式分成css样式表?不这样做实在是很差的做法.



Is there any reason why you are not separating the style into a css stylesheet? It''s really poor practise not doing so.


但是当我使用此类时,它将影响其他浏览器,
IE6就可以了,但是IE7,IE8 firefox变坏了.
But when i use this class, it will effect on other browsers,
then IE6 is OK, but IE7,IE8 firefox, goes bad.


您是说我建议的类确实破坏了Firefox等的布局吗?

我建议的类旨在将页面上固定宽度为1025px的div居中.那是你想要的吗?

该类通常可在所有浏览器上使用.也许,如果您发布更多的html,我可以找出导致布局问题的其他原因.
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.


这篇关于网站顶部标头已固定,带有滚动体,IE8和IE6调整的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆