English 中文(简体)
IE7:绝对定位的儿童潜水与负CSS值为权利
原标题:IE7: Absolutely positioned Child Div with a negative CSS value for right

我已经搜索了几个小时:

我正在创建一个小条形图,我正在用jQuery制作动画。

我将右栏作为左栏的子栏,这样当我为它们的宽度属性设置动画时,它们将始终保持在一起。因此,在异步动画过程中,它们永远不会分离。(我可以设置左栏的动画,右栏只会标记…,因为它是一个子元素)

我用jQuery设置了这两个条的高度/宽度(左右两个类)。我为左栏的宽度属性设置了动画来调整它的大小。为了调整右栏的大小,我设置了CSS“right”属性的动画。

所以问题来了:右div是不可见的,右的值为负数(我也尝试了margin-right)。右值为正值时,它礼貌地出现在其父div(左栏)中。当我试图把它放在左栏的右边时,它就消失了。

救命!!:-奥

它在IE8和其他所有方面都非常出色。

<div class="container" >
                <div class="left">
                    <div class="right"></div>
                </div>  
</div>


div.left{
    background-color:#93dbfb;
    overflow:visible;
    position:absolute;
    width:300px;
    left:0px;
}

div.right{
    background-color:#ffce42;
    z-index:100;
    position:absolute;
    width:300px;
    right:-300px;
}

(同样,高度/宽度和右侧属性都使用jQuery设置了动画)

**更新**

我已经尝试使用它的LEFT属性(使用值LEFT.width+[value])设置右侧栏的位置。同样的问题也出现了。

最佳回答

我想对此发表评论,但我似乎还不能发表。无论如何,不确定这是否适用于IE7,但这是否像你试图做的那样http://jsfiddle.net/MnnyH/1/我知道你试图制作一张图表,但这很容易变成垂直的。

问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

Drop down background url in Safari Issue

selectBox.selectCSS { background: url(/Images/replacementSelectBackground.png) top left no-repeat height:auto; } I have an issue in Safari only where the image is not rendering on top ...

CSS specific for Safari

How do you target specifically safari in css with styles?

Aligning textarea in a form

Ive used the following css code to align my form elements: form { position:relative; } form input { position:absolute; left:11em; } However, the textarea element is not aligned correctly with the ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

CSS problem with page footer

I have defined my page footer in the css file as: #footer { position: absolute; height: 50px; text-align: center; background: #66CCCC; bottom: 0px; left: 0px; width: 100%; height: ...

热门标签