IE悬停错误的任何变通方法? [英] Any workarounds for an IE hover bug?

查看:84
本文介绍了IE悬停错误的任何变通方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




感谢所有为我上一篇文章做出贡献的人(对于那些

注意到的人...我现在已经删除了XHTML ;-)


在下面列出的页面中,显示了一个两部分水平菜单,从左侧缩进

。菜单的第一部分是左对齐的,第二部分是&b
部分是正确的。它在IE6和FireFox中看起来都是正确的....直到

你将鼠标移到其中一个左手链接上。然后,在IE6中,

背景颜色的变化会导致重排。这会导致NavContainer div

展开,将右侧菜单项从页面上移开。刷新或

调整页面大小可以正确地重新绘制。


我已经读过IE中的各种悬停错误,但我可以做一些指针

可能导致我的问题,如果有解决方法。


谢谢


码头


<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01 // EN"

" http://www.w3.org /TR/html4/strict.dtd">

< html>

< head>

< style type ='' text / css''media =''all''>


#MainBody

{

position:relative;

border:solid 1px white;

margin:0 1em 0 17em;

}


# NavContainer

{

位置:绝对;

宽度:100%;

背景颜色:灰色; < br $>
}


#SecondaryNav

{

职位:绝对;

顶部:0;

右:0.5em;

}

#PrimaryNav ul,#SecondaryNav ul

{

填充:0;

保证金:0;

}


#PrimaryNav li,#SecondaryNav li

{

list-style:none;

保证金:0;

显示:内联;

}


#PrimaryNav li a,#SecondaryNav li a

{

border:solid 1px#036;

}


#PrimaryNav li a:悬停,#SecondaryNav li a:悬停

{

背景颜色:#036;

}

< / style>

< / head>

< body>

< div id ='' MainBody''>

< div id =''NavContainer''>

< div id =''PrimaryNav''>

< ul>

< li>< a href =''''>链接1< / a>< / li>

< ; li>< a href =''''> Link 2< / a>< / li>

< li>< a href =''''> Link 3< ; / a>< / li>

< li id =''当前''>< a href =''''>链接4< / a>< / li>

< / ul>

< / div>

< div id =''SecondaryNav''>

< ul>

< li>< a href =''''>链接4< / a>< / li>

< / ul>

< / div>

< / div>

< / div>

< / body>
$ b comp.infosystems中的$ b< / html>

解决方案


IE,但我可以做一些指示
,这可能会导致我的问题,如果有一个解决方法。

谢谢

码头




URL?


-

Lauri Raittila< http://www.iki.fi/ LR> < http://www.iki.fi/zwak/fonts>

乌得勒支,NL。


Piers Lawson写道:


我已经阅读过IE中的各种悬停错误,但我可以做一些指示
,这可能会导致我的问题以及是否有解决方法。


唯一的悬停bug在IE中是适用的:只悬停

元素。它忽略了所有其他人。

我怀疑你的悬停问题更多地与不同的边距

以及IE使用的填充与Firefox与Opera的填充有关。完全指定

保证金和填充。

URL可以帮助您调试代码。


-

jmm dash list(at)sohnen-moe(dot)com

(删除电子邮件的.AXSPAMGN)


Piers Lawson写道:


我已经读过IE浏览器中的各种悬停错误,但我可以做一些指示
,这可能会导致我的问题,如果有的话是一种解决方法。




您可能会在

< URL:http://www.positioniseverything.net找到相关内容/explorer.html>


-

回复电子邮件地址是无底垃圾邮件桶。

请回复群组,以便每个人都可以分享。


Hi

Thank you to everyone who contributed to my last post (for those that
noticed... I''ve now removed the XHTML ;-)

In the page listed below, a two part horizontal menu is displayed, indented
from the left. The first part of the menu is left justified and the second
part is right justified. It looks correct in both IE6 and FireFox.... until
you move your mouse over one of the left hand links. Then, in IE6, the
change in background color causes a reflow. This causes the NavContainer div
to expand, pushing the right hand menu item off the page. Refreshing or
resizing the page gets it redrawn correctly.

I''ve read about various hover bugs in IE, but I could do with some pointers
as to which may be causing my problem and if there is a workaround.

Thanks

Piers

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style type=''text/css'' media=''all''>

#MainBody
{
position:relative;
border: solid 1px white;
margin: 0 1em 0 17em;
}

#NavContainer
{
position:absolute;
width:100%;
background-color:grey;
}

#SecondaryNav
{
position:absolute;
top:0;
right:0.5em;
}

#PrimaryNav ul, #SecondaryNav ul
{
padding: 0;
margin: 0;
}

#PrimaryNav li, #SecondaryNav li
{
list-style: none;
margin: 0;
display: inline;
}

#PrimaryNav li a, #SecondaryNav li a
{
border: solid 1px #036;
}

#PrimaryNav li a:hover, #SecondaryNav li a:hover
{
background-color: #036;
}

</style>
</head>
<body>
<div id=''MainBody''>
<div id=''NavContainer''>
<div id=''PrimaryNav''>
<ul>
<li><a href=''''>Link 1</a></li>
<li><a href=''''>Link 2</a></li>
<li><a href=''''>Link 3</a></li>
<li id=''Current''><a href=''''>Link 4</a></li>
</ul>
</div>
<div id=''SecondaryNav''>
<ul>
<li><a href=''''>Link 4</a></li>
</ul>
</div>
</div>
</div>
</body>
</html>

in comp.infosystems.www.authoring.stylesheets, Piers Lawson wrote:

Hi

I''ve read about various hover bugs in IE, but I could do with some pointers
as to which may be causing my problem and if there is a workaround.

Thanks

Piers



URL?

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.


Piers Lawson wrote:


I''ve read about various hover bugs in IE, but I could do with some pointers
as to which may be causing my problem and if there is a workaround.


The only hover "bug" in IE is that it applies :hover only to anchor
elements. It ignores all others.
I suspect your hover problem has more to do with the different margin
and padding that IE uses vs Firefox vs Opera. Completely specify the
margin and padding.
An URL would go a long way to debugging your code.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)


Piers Lawson wrote:


I''ve read about various hover bugs in IE, but I could do with some pointers
as to which may be causing my problem and if there is a workaround.



You''ll probably find something relevant at
<URL:http://www.positioniseverything.net/explorer.html>

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.


这篇关于IE悬停错误的任何变通方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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