Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/shell/5.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
Html 是否可以在标题容器全屏宽度内进行div?_Html_Css - Fatal编程技术网

Html 是否可以在标题容器全屏宽度内进行div?

Html 是否可以在标题容器全屏宽度内进行div?,html,css,Html,Css,我为我们公司现有的网站做了一个新的设计。它在标题容器内的容器中具有导航按钮 在新设计中,此导航栏具有全屏宽度 是否可以在不更改html代码的情况下执行此操作?(因为他们告诉我不要触摸html。) 我希望我的问题说得足够清楚 /编辑。我只需要使用css代码 .header_div_button_container { float: left; margin-left: -131px; margin-right: 0; margin-top: 130px; } .ho

我为我们公司现有的网站做了一个新的设计。它在标题容器内的容器中具有导航按钮

在新设计中,此导航栏具有全屏宽度

是否可以在不更改html代码的情况下执行此操作?(因为他们告诉我不要触摸html。)

我希望我的问题说得足够清楚

/编辑。我只需要使用css代码

.header_div_button_container {
    float: left;
    margin-left: -131px;
    margin-right: 0;
    margin-top: 130px;
}
.homepage .header_div_button_container {
    margin-left: -137px;
}
.header_div_button {
    background-color: #034ea2;
    color: #FFFFFF;
    float: left;
    font-size: 11px;
    font-weight: bold;
    height: 16px;
    padding-top: 10px;
    text-align: center;
    width: 110px;
}
这是我得到的css的一小部分。html主要是由我们使用的cms创建的,对于stackoverflow来说,它不是真正可读的


我希望你能用这个做点什么。

假设这样的结构

HTML

<header>

  <div class="inner"></div>

</header>


基本文章:

没有。不够清楚!还有小提琴?例如,您试图达到的目标。您想在不更改HTML代码的情况下更改HTML设计吗?CSS更改?导航栏当前是其容器的100%宽度(当然)。但该设计具有全屏幕宽度(机身)。但我实际上不允许更改html。那么,有没有可能用css实现这一点呢。(不用提琴对不起)你是真的在更改标题/导航的宽度,还是只是想让背景延伸到视口窗口的100%。非常感谢,我想我可以通过你给我的链接找到答案;)
.inner {
  height:100px;
  max-width:1100px;
  margin:0 auto;
  background-color: blue;
  position: relative;

}
.inner:before, .inner:after {
  content: "";
  position: absolute;
  background-color: lightblue;
  top: 0;
  bottom: 0;
  width: 9999px;   /* some huge width */
  z-index:-2;
} 

.inner:before {
  right: 100%; 
}
inner:after {
  left: 100%;

}