Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
CSS页脚宽度_Css_Drupal_Web_Footer - Fatal编程技术网

CSS页脚宽度

CSS页脚宽度,css,drupal,web,footer,Css,Drupal,Web,Footer,我已经使用CSS只有几个星期了。我正在使用Drupal重新创建一个网站。我的页脚有问题,它将无法扩展以适应屏幕(如stackoverflow上的一个)。我想能够缩小,它将扩展到整个网站 我已经在网上搜索了大约两天,试图找出这个问题,现在我没有更多的想法可以尝试 我的站点当前位于开发服务器上,因此我可以访问所有文件。我想我需要编辑的文件是layout.css,但是如果它在另一个文件中,请让我知道 /* * site-specific layout statements */ /* S

我已经使用CSS只有几个星期了。我正在使用Drupal重新创建一个网站。我的页脚有问题,它将无法扩展以适应屏幕(如stackoverflow上的一个)。我想能够缩小,它将扩展到整个网站

我已经在网上搜索了大约两天,试图找出这个问题,现在我没有更多的想法可以尝试

我的站点当前位于开发服务器上,因此我可以访问所有文件。我想我需要编辑的文件是layout.css,但是如果它在另一个文件中,请让我知道

    /*
*   site-specific layout statements
*/
/*  Structure
-------------------------------------------------------------- */

body,html{
    margin:0px;
    padding:0px;
    background: #17293d url(../img/backgrounds/main_bg.gif);
}

#totalContainer{
    //margin-top:10px;
    //margin-bottom:10px;
}

.width_1#totalContainer{
    width:1038px;
}

.width_2#totalContainer{
    width:978px;
}

#topBar{
    margin:0px;
    padding:0px;
    float:left;
    width:100%;
}

#topBarContainer{
    margin:15px auto 15px auto;
}

.width_1#topBarContainer{
    width:1038px;
}

.width_2#topBarContainer{
    width:978px;
}

#topBarLink{ /* top toggle bar */
    text-align:center;
    margin:0px;
    padding:0px;
    height:10px;
    width:100%;
}

#topBarLink a{ /* top toggle bar */
    float:left;
    margin-left:48.5%; /* make it block level and try to center it without javascript..*/
    padding:15px 10px 5px 10px;
}

#topBarLink.withoutTopRegion a{ /* makes space in case we don't have any element in the top Region */
    margin-bottom:50px;
}

#top{ /* upper part of the template */
    float:left;
    width:101.2%;
    height: 84px;
    position:relative;
    /* margin-bottom:10px; */
    /* background: #black; */
}

#topUtility{
    position:absolute;
    top:13px;
    right:18px;
}

#logo-container{ /* image logo container */
    float:left;
    height:150px;
    margin-right:10px;
    margin-top: 0px;
}

#title-slogan{ /* site title and slogan container */
    float:left;
    margin-top:20px;
}

#site-title,
#site-slogan{ 
    margin:0px;
    padding:0px;
}

#search{ /* theme search box */
    position: absolute;
    right:0px;
    top: 30px;
}

#search div{ /* search button inline */
    display: inline;
}

//#pageBorder{ /* makes the border */
    //float: left;
//}

.ie7 #pageBorder{ /* for IE7 */
  float: none;
  overflow: hidden;
}

/*#contentWrapper{ /* wraps content */
/*  float: left;
    padding:15px 5px 15px 5px;
    position: relative;
    z-index: 1; /* follows the z-index order of primary menu and advertise (to solve ie7 z-index BUG )*/
/*}*/

.breadcrumb{ /* breadcrumb */
    padding-bottom: 5px;
    border-bottom: 1px dashed #ccc;
    margin:0px 10px 15px 10px;
}

#footer{ /* site footer*/
    margin-top: 25px;
    /* padding-bottom:60px; */
    float: left;
/*  width: 100%;*/
    min-width:100%;
    max-width:100%;
    position:relative;
    background:#000000;
    display: block;
}

#navigation-footer{ /* site footer*/
    position:absolute;
    right:0px;
    top:0px;
    background:#000000;
}

#bottomUtility{
    position:absolute;
    top:0px;
    right:0px;
}

/* utility menu */

.utility ul.menu{
    margin:0px;
    padding:0px;
    list-style:square;
}

.utility ul.menu li{
    display:inline;
    margin:0px 0px 0px 4px;
    padding:0px;
    list-style:square;
}

.utility ul.menu li a{
    padding-right:8px;
    list-style:square;
}

.utility ul.menu li:after{
    content:"|";
    list-style:square;
}


/*  Look & Feel
-------------------------------------------------------------- */

body.marinelli{
    background: #17293d url(../img/backgrounds/body.gif);
    /* background: #000; */
    height:125px;
}

#topBar,#topBarLink,#topBarLink a{ /* top toggle bar */
    //background:#054b81;
    background:#101518;
}

#topBarLink a{
    font-size: 1.1em;
}

.outsidecontent{
    color:white;
}

#site-title,
#site-slogan{
    font-weight: bold;      
}

#site-title{
    font-size: 3em;
    line-height:0.8em;
}

#site-slogan {
    font-size: 2em;
    text-indent: 0.5em;
}

#pageBorder{ /* border of the whole site */ 
    //border:10px solid #054b81;
    //border:10px solid #0c0c0c;
}

#pageBorder.noborder{ /* when we don't have the advertise region */ 
    border-top:0px;
}

#contentWrapper{
    //background: #17293d url(../img/backgrounds/main_bg.gif);

}

.breadcrumb { /* breadcrumb */
    font-weight: bold;
}

.utility{ /* utility menu */
    font-size:0.9em;
    //text-transform:uppercase;
    list-style:square;
}

在过去,我发现需要将页面主体的宽度设置为100%,以便允许子元素(页脚)扩展到100%。所以试着这样做:

body,html{
margin:0px;
padding:0px;
width: 100%;
background: #17293d url(../img/backgrounds/main_bg.gif);
}

你需要一个“宽度:100%”的外壳然后是一个居中的内部元素

HTML


这里的问题是您有一个用于布局目的的表。表通常仅用于显示表格数据,而不是布局。表的默认行为是收缩到其内容(即,如果您的内容很小,它不会扩展页面的整个宽度)

如果无法修改标记,则只需添加以下内容:


您能用HTML创建一个吗?这里没有足够的信息来帮助您(我可以有标记?),但是有多个元素具有硬编码的宽度:
.width\u 1\totalContainer
.width\u 2\totalContainer
,等等,您的fiddle有多个实例试图用双斜杠(
/
)注释掉CSS的特定行,但只有完整的C样式注释(
/**/
)才可用于注释。如果您在项目周围有小间隙,你可以照LukeP说的做,也可以使用reset.css,如果你搜索的话,还有很多选择。是的,这就成功了,谢谢你和所有回复的人。我还将修正评论。
<footer>
  <ul>
    <li>Content</li>
    <li>Content</li>
    <li>Content</li>
    <li>Content</li>
    <li>Content</li>
    <li>Content</li>
  </ul>
</footer>
footer {
  width:100%;
  padding:2em 0;
  background:#d0d0d0;
  border-top:5px solid #000;
}
footer ul {
  width:960px;
  margin:0 auto;
}
#footer table {
    width: 100%;
}