Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.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
Can';不能使用HTML/CSS更改页边距_Html_Css - Fatal编程技术网

Can';不能使用HTML/CSS更改页边距

Can';不能使用HTML/CSS更改页边距,html,css,Html,Css,在这里,左边/右边的空白不起任何作用。这和宽度有关吗?这将是一个左右栏的网页,仍然需要在中间添加一条线。 .wrap { width: 100%; overflow: scroll; } .fleft { float:left; width: 50%; background:white; height: 1000px; margin-left: 6cm; } .fright { float: right; backgr

在这里,左边/右边的空白不起任何作用。这和宽度有关吗?这将是一个左右栏的网页,仍然需要在中间添加一条线。
.wrap {
    width: 100%;
    overflow: scroll;
}

.fleft {
    float:left; 
    width: 50%;
    background:white;
    height: 1000px;
    margin-left: 6cm;
}

.fright {
    float: right;
    background:white;
    height: 1000px;
    width: 50%;
    margin-right: 6cm;
}
也不起作用

.wrap {
width: 100%;
overflow: auto
margin: 0 0 10px 10px;
}

.fleft {
float:left; 
width: 50%;
background:white;
height: 1000px;


}

.fright {
float: right;
background:white;
height: 1000px;
width: 50%;

}

删除边距的数字和属性值之间的空格。e、 g:

margin-left: 6cm;

css属性值声明中不允许有空格,如下
左边距:6厘米

工作声明规则

margin-left: 6 cm;
正确的sysntax:

margin-left: 6cm;

没有看到你的标记,我想结合边距和相反的浮动将变得更为复杂…这里也提供你的html代码…删除一个容器仍然是一个问题不再是问题。