如何消除列表上方的空间?

时间:2014-04-22 12:13:11

标签: css wordpress

我想在这个WordPress功能框中减少lorem ipsum文本的底线和我的无序列表之间的大黑空间。

如何使用CSS执行此操作?

You can see an image of this list here

WordPress development site here

这里有CSS:

.title-area {
  text-indent: -9999px;
  background: url(http://bryancollins.eu/wp/wp-content/uploads/2014/03/WRP-Logo-SVG.svg)  no-repeat scroll top transparent;
  background-size: 320px 65px;
}


.featured-box {
  border-radius: 20px;
    background-color: #000;
    color: #fff;
    padding: 20px;
    margin: 0 auto;
    margin-top: 10px;
    overflow: visible;
    width: auto;    
    max-width: 1140px; 
    position: relative;
}

.featured-box h4 {
    font-size: 20px;
    color: #fff;

}

.myimage {

    float:right;
}

.featured-box p {
    padding: 0 0 20px;
}


.featured-box .enews p {
    padding: 10 10 10 10px;
    color: #fff;
    float: left;
    width: 220 px;
    margin: 10 10 10 10px;

}

.featured-box .enews #subscribe {
    padding: 20 20 20 20px;;

}

.featured-box .enews #subbox {
    background-color: #fff;
    margin: 0;
    width: 300px;

}

.featured-box .enews .myimage {

      float: right;
      margin-left: 10px;
      margin-right: 50px;
       width: auto;
}

section.enews-widget {
   overflow: hidden;
}


.featured-box .enews input[type="submit"] { 
    background-color: #d60000;
     padding: 10 10 10 10px;
     width: 150px;

}


@media screen and (min-width: 1024px)  {
    div.featured-box {
      margin-top: 150px;
      overflow: hidden;

   }
}

@media only screen and (max-width: 767px) {
 section.enews-widget {
 clear: both;
 overflow: hidden;


}

.myimage {
  float: none;
}

.myimage img {
  display: block;
  height: auto;
  margin: 0 auto;
 }
}

#text-4 > div:nth-child(1) > h4:nth-child(1) {
        color: #fff;
        font-size: 1.3em; font-weight: normal;
        text-transform: uppercase;
        background-color: #d60000; 
        position: relative;
        margin: 0px -20px 20px -20px;
        padding: 18px 0px 16px 20px;

 }




 .page p { line-height: 1.2em; }
 .page a { color: #1badd2; text-decoration: none; }




 .featured-box .widget li {


            display: inline; position: relative; 
            border-bottom: none;
            list-style: none;
            background: url("http://bryancollins.eu/wp/wp-content/uploads/2014/04/arrow.png") no-repeat scroll 0 10px rgba(0, 0, 0, 0);
            display: inline;
            margin: 0 0 20px 30px;
            padding: 5px 0 0px 40px;
 }

4 个答案:

答案 0 :(得分:3)

p删除填充:

.featured-box p {
   padding: 0
}

此外,您在css下面有错误:

.featured-box .enews p {
   padding: 10 10 10 10px; /* no units */
   color: #fff;
   float: left;
   width: 220 px; /* space between number and unit */
   margin: 10 10 10 10px; /* no units */
}

.featured-box .enews #subscribe.featured-box .enews input[type="submit"]

相同

答案 1 :(得分:0)

featured-box p {
  padding: 0;
  margin:0;
}

这样您就可以删除第1760行padding: 0 0 20px;中提供的style.css,同时删除margin: 0 0 24px;第186行中p标记的默认style.css

答案 2 :(得分:0)

删除这里的填充:

media="all"
.featured-box p {
padding: 0 0 20px;
}

或此处的边距

media="all"
p {
margin: 0 0 24px;
padding: 0;
}

答案 3 :(得分:0)

从段落标记中删除填充:

.featured-box p {
    padding: 0 !important;
}