Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.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定位div_Css_Html - Fatal编程技术网

使用css定位div

使用css定位div,css,html,Css,Html,你能看看这个吗 如何按以下顺序定位div 蓝色div在左侧显示为左侧菜单,红色div位于蓝色div的右侧。Addfloat:left到两个: #a { width: 25%; border: thick solid Blue; height: 200px; display:inline; float:left; } #b { width: 25%; border: thick solid Red; height: 200px; display:inline; float:l

你能看看这个吗 如何按以下顺序定位div


蓝色div在左侧显示为左侧菜单,红色div位于蓝色div的右侧。

Add
float:left到两个:

#a {
 width: 25%;
 border: thick solid Blue;
 height: 200px;
 display:inline;
 float:left;
}

#b {
 width: 25%;
 border: thick solid Red;
 height: 200px;
 display:inline;
 float:left;
}

添加<代码>浮动:左到两个:

#a {
 width: 25%;
 border: thick solid Blue;
 height: 200px;
 display:inline;
 float:left;
}

#b {
 width: 25%;
 border: thick solid Red;
 height: 200px;
 display:inline;
 float:left;
}

或将两个分区的显示:内联更改为显示:内联块。

或将两个分区的显示:内联更改为显示:内联块