English 中文(简体)
当窗户转户时,离婚不会转移。
原标题:Div s don t move when window resizes
  • 时间:2011-10-07 16:28:27
  •  标签:
  • html
  • css

我把2个iv头放在另一个 d头上,但当我转播他们留下的窗户时,不要把他们放在后面。 我认为,如果存在相对立场的话,它们就与以前的四分五裂一样,但似乎并没有这样做。 我失踪了什么?

安保部和下文的超文本,简化。

<div class="wrapper" style="margin: 0 auto; text-align: center;">
<div id="0">
            <img src="0.gif" width="960px" alt="" />
            <div class="top">
                <div id="tag" ><img src="tag.png" alt="" /></div>
                <div id="tag2"><img src="5500.png" alt="" /></div>
            </div>
</div>
</div>

CSS喜欢:

#0 {
        clear:                  right;
        z-index:                0;
}    
.top {
        float:                  left;
        z-index:                1;
        clear:                  left;
        position:               relative;

}

#tag {
        margin-top:             -500px;
        margin-left:            -600px;


}

#tag2{
        margin-left:            750px;

}
最佳回答

It seems like you re expecting the top div, with its associated tag divs, to move with the 0.gif image when you resize the page. Instead, it s moving relative to the left edge of the wrapper div, which is pegged to the left-hand side of the screen. You will probably get the result you want by adding width: 960px to the style of your .wrapper div.

为了进一步开明,检查每块 your子上的捆绑箱。 您可能发现,一种临时性的<代码>边界:2px固体绿色风格有助于清理货物。

问题回答

暂无回答




相关问题
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....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

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

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签