我目前正在建立我的博客,我很难按照我计划的方式格式化标题。
Here is my site。正如你所看到的,他们在标题的边上有额外的空间。我的目标是删除空间,这样花朵图案就会与内容框或任何你称之为它的东西齐平。
我已经通过我的主题的CSS多次,并改变了一切和任何可能与标题图像相关的页边距,宽度和填充,但没有任何运气。他们是不是我漏掉了什么?
我的博客是通过Wordpress托管的,我的父主题来自Genesis框架。
以下是标题图像的CSS:
/*
Site Header
--------------------------------------------- */
.audrie .site-header {
background-position: center;
padding:0px 0;
width:100%;
}
/* Title Area
--------------------------------------------- */
.title-area {
padding: 0px 0;
margin-bottom: 30px;
margin-top: 20px;
}
.title-area h1 {
margin: 0 auto;
}
.title-area p {
margin: 0;
}
.header-image .title-area {
padding: 0;
width:100%;
}
.site-title,
.site-title a {
font-size: 64px;
font-weight: 600;
letter-spacing: 8px;
line-height: 1.2;
text-align: center;
text-decoration: none;
text-transform: uppercase;
overflow-wrap: break-word;
}
.site-title a,
.site-title a:hover {
color: #747474;
}
.site-description {
color: #808080;
font-family: Lato;
font-size: 13px;
font-weight: 300;
letter-spacing: .5px;
margin: 0;
text-align: center;
text-transform: none;
}
/* Full width header, no widgets */
.header-full-width .title-area,
.header-full-width .site-title {
width: 100%;
}
.header-image .site-description,
.header-image .site-title a {
display: block;
text-indent: -9999px;
}
/* Logo, hide text */
.header-image .site-header {
background-position: center !important;
background-size: 1000px 200px !important;
padding: 0;
margin-top:-90px;
padding-bottom:30px;
}
.header-image .site-title a {
float: none;
min-height: 200px;
width: 100%;
}
/* Widget Area
--------------------------------------------- */
.site-header .widget-area {
float: right;
text-align: right;
width: 720px;
}
.header-image .site-header .widget-area {
padding: 0px 0;
}
.site-header .search-form {
float: right;
margin-top: 22px;
}任何正确方向的帮助或指导都将不胜感激!谢谢!
发布于 2017-01-31 00:54:30
你可以这样做:
.site-container{
padding: 0
}
.header-image .site-header{
background-size: 1100px 200px !important;
}
.site-inner{
padding: 36px;
}也许有一些!重要的是需要检查响应行为..
发布于 2017-01-31 00:54:45
您的页眉(.site-header)的背景大小固定为:
background-size: 1000px 200px !important;但是你的.site-container div的最大宽度是1100px,这使得你的图片比其他图片要小。相反,让它具有响应性,如:
background-size: 100% auto !important;
/*Assuming you have a reason for "!important" */发布于 2017-01-31 00:58:36
.site-container有一个36px的水平填充,这导致了标题周围的空白。如果添加以下内容:
.site-container {
padding-left: 0;
padding-right: 0;
} 您的水平空格将消失,但您还需要添加:
header {
background-size: 1100px 200px !important
}将顶部图像设置为全宽。
最后,我要补充一句:
.site-inner{
padding-left: 36px;
padding-right: 36px;
}所以你的文本在边上有一些空间。
https://stackoverflow.com/questions/41941121
复制相似问题