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

标签 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;
 }

最佳答案

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"] 相同

关于css - 如何消除列表上方的空间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23219235/

相关文章:

css - 应用样式表时 QScrollbar 的 qt 右侧箭头消失

javascript - 悬停时使用淡入淡出效果交换图像

php - Wordpress:更新和预览按钮重定向到主页

php - 在 WooCommerce 中获取具有日期范围的可预订产品的定价数据

Html - 两个垂直 div 并排 100% 高度滚动背景未完全显示

html - 受浏览器屏幕分辨率更改影响的元素定位

html - W3.CSS 进度条无法在表格的同一行显示文本和进度条

wordpress - 如何创建用于提交 WP 帖子的离线表单

wordpress - 如何从 WordPress 管理侧边栏删除帖子

php - 对于 wordpress,是否有类似 current_user_can 的语句,如果用户没有特定访问权限则显示一些内容?