0

我在 www.recaccesorios.com 的主页上工作,我正在努力解决填充问题。两个元素之间的垂直距离太大,我不知道为什么要这样做。我将向您展示使用 Google Chrome 进行的检查:

在此处输入图像描述

如您所见,Chrome 告诉我顶部填充为 0 或 null,但在图像中您可以看到它不是真的。怎么了?

我可怕的 CSS(不是整个 CSS,我不能放在这里超过 3000 行......):

#galeria {

-moz-border-radius: 4px;
-webkit-border-radius: 4px;
background-color: rgb(222,222,222);
background-color: rgba(222,222,222,0.8);
border: 1px solid #e5e5e5;
border-radius: 4px;
/* padding-bottom: 40px; */
width: 100%;
}

#galeria > h5 {
text-align: center;
}

#noticias > h5 {
text-align: center;
}

#noticias a {
color:#555;
}

#noticias p {
text-align : justify;
padding-left:12px;
padding-right:12px;
}

#noticias {
height:292px;
}

#vistaPrevia {
position: absolute;
z-index: 6;
top: 40px;
display: none;
}

#galeria > img {
display: block;
margin-left: auto;
margin-right: auto;
}

#galeria > span {
margin-left: 5px;
}
#noticias {

-moz-border-radius: 4px; 
-webkit-border-radius: 4px; 
background-color: rgb(222,222,222); 
background-color: rgba(222,222,222,0.8);
border: 1px solid #e5e5e5;
border-radius: 4px;
/* padding-bottom: 40px; */
width: 100%;
}

.td-galeria {
padding-right: 6px;
padding-left: 0px;
border-color:transparent;
width:50%; 
height:300px;
}

.td-noticias {
padding-left: 6px;
padding-right: 0px;
}
4

3 回答 3

2

我认为问题是 CSS 文件第 42 行的重置,vertical-align: baseline;这似乎导致了您的 chrome 问题。

这解决了这个问题:

#tablaInicio td {vertical-align:}

但这很奇怪。

编辑:

找出奇怪的原因;这是一个导致额外高度的 JS 脚本。

于 2013-04-27T10:08:37.100 回答
1

问题存在于 Style.css 的第 42 行;

消除 vertical-align:baseline;

也正确

#tablaInicio td {vertical-align:}
于 2013-04-27T10:29:53.550 回答
0

We need to see your CSS to understand this better. But, I'm guessing you've declared the padding somewhere else in your code.

In your CSS file, change the padding value line to something like this:-

"padding: 0px !important";

the !important message means it will ignore any other values you try to set for padding.

I hope this helps.

于 2013-04-27T09:51:29.720 回答