html文本溢出拖动框,html – 包含div的CSS内容溢出

本文讨论了一个关于网页布局中DIV元素重叠的问题,并提供了出现问题的CSS样式及HTML结构示例,寻求解决办法确保所有元素正确显示。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

目前有些DIV与其包含DIV重叠的问题.见下图(底部的3个产品):

页面的所有正文内容都保存在#content DIV中:

div#content {

width: 960px;

float: left;

background-image: url("../img/contentBg.png");

background-repeat: repeat;

margin-top: 10px;

line-height: 1.8em;

border-top: 8px solid #5E88A2;

padding: 10px 15px 10px 15px;

}

这是#content div中产品盒的CSS:

.upper {

text-transform: uppercase;

}

.center {

text-align: center;

}

div#products {

float: left;

width: 100%;

margin-bottom: 25px;

}

div.productContainer {

float: left;

width: 265px;

font-size: 1em;

margin-left: 50px;

height: 200px;

padding-top: 25px;

text-align: right;

}

div.product {

float: left;

width: 200px;

}

div.product p {

}

div.product a {

display: block;

}

div.product img {

float: left;

}

div.product img:hover {

opacity: 0.8;

filter: alpha(opacity = 80);

}

div.transparent {

opacity: 0.8;

filter: alpha(opacity = 80);

}

这里是框的HTML:

A2 Print

Representation of image printed at A2 Print through Website.

16.5 inches x 23.4 inches£15.99

Yes - your picture quality is high enough for this size

Select

A1 Print

Representation of image printed at A1 Print through Website.

23.4 inches x 33.1 inches£19.99

Warning - your picture quality may not be sufficient for this size

Select

Poster Print (60cm x 80cm)

Representation of image printed at Poster Print (60cm x 80cm) through Website.

23.6 inches x 31.5 inches£13.95

Warning - your picture quality may not be sufficient for this size

Select

知道什么可能导致这些DIV重叠?我想要的是所有的框都符合预期的#container div.这让我疯狂!

干杯

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值