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
Html css中心问题_Html_Css - Fatal编程技术网

Html css中心问题

Html css中心问题,html,css,Html,Css,我无法将#headermain内的#logo div居中 我给利润:汽车;但是什么都没有发生#headermain也通过使用margin:auto居中 div#logo必须具有宽度属性,用于边距:自动要工作div#logo必须具有宽度属性,用于边距:自动工作使用宽度属性: #headermain{宽度:1000px;边距:0自动;} #徽标{宽度:400px;边距:0自动;} 使用宽度属性: #headermain{宽度:1000px;边距:0自动;} #徽标{宽度:400px;边距:0自动;}

我无法将#headermain内的#logo div居中


我给利润:汽车;但是什么都没有发生#headermain也通过使用margin:auto居中

div#logo
必须具有
宽度
属性,用于
边距:自动
要工作

div#logo
必须具有
宽度
属性,用于
边距:自动工作

使用
宽度
属性:

#headermain{宽度:1000px;边距:0自动;}
#徽标{宽度:400px;边距:0自动;}

使用
宽度
属性:

#headermain{宽度:1000px;边距:0自动;}
#徽标{宽度:400px;边距:0自动;}

是吗#logo{text align:center}

是吗#logo{text align:center}

给我们一些css看看……您是否使用
margin:auto
左边距:自动
右边距:自动?给我们一些css来看看…你在使用
margin:auto
左边距:自动
右边距:自动?@susan这里是一个工作示例(根据我们目前所知)@susan这里是一个工作示例(根据我们目前所知)
<div id="headermain">
 <div id="logo">
            <a href="#">net</a>
        </div>