为什么这些 div 重叠?

发布于 2024-08-23 15:16:05 字数 565 浏览 12 评论 0原文

我把 wmd 放在我的网站上。输入代码并进行旋转后,我看到下面的图片。

如何使预览 div 不与文本区域重叠? -编辑-黑色是div wmd-preview

一些html

<div id="wmd-editor" class="wmd-panel"><div id="wmd-button-bar"></div>
<textarea id="wmd-input" name="body" rows="10" cols="89"></textarea>
...
</div></form><div id="wmd-preview" class="wmd-panel"></div>

的css背景http://i49.tinypic.com/2u7mxvl.png

I putting wmd on my website. After putting code in and giving it a spin i see this image below.

How can i make the preview div not overlap with the textarea? -edit- the black is the css background of div wmd-preview

some html

<div id="wmd-editor" class="wmd-panel"><div id="wmd-button-bar"></div>
<textarea id="wmd-input" name="body" rows="10" cols="89"></textarea>
...
</div></form><div id="wmd-preview" class="wmd-panel"></div>

http://i49.tinypic.com/2u7mxvl.png

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

秉烛思 2024-08-30 15:16:05

尝试为 wmd-panel 类添加“Width”属性值和“Float:Left”属性值。

width: value;
float: left;

如果这不起作用(并且仅当它不起作用时),请尝试在 wmd-panel 类上设置较高的 margin-top 值。 IE

margin-top: 25px;

Try adding a "Width" property value and "Float:Left" property value for the wmd-panel class.

width: value;
float: left;

If this does't work (and only if it doesn't work) trying setting a high margin-top value on the wmd-panel class. I.e.

margin-top: 25px;
听风念你 2024-08-30 15:16:05

您是否尝试过增加预览 div 的 z-index ?

#wmd-preview { z-index: 100; }

Have you tried increasing the z-index of the preview div?

#wmd-preview { z-index: 100; }
救赎№ 2024-08-30 15:16:05

设置浮动,或者如果您需要小气,则将“wmd-editor”设置为绝对定位,仅适用于 IE 或所有浏览器。我知道这不是最有效的方法,但在某些情况下它可能是最简单的^^

Set the floats or if you need to be stingy set the "wmd-editor" as absolute positioning, for either just IE or all. I know its not the most effective way but it can be the easiest in some cases ^^

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文