CSS将菜单与内容内联
所以我有一个菜单,不管我做什么,它都不想与内容内联。 这里有一些照片,现在(以前)是怎样的,我希望(以后)是怎样的 代码如下:CSS将菜单与内容内联,css,Css,所以我有一个菜单,不管我做什么,它都不想与内容内联。 这里有一些照片,现在(以前)是怎样的,我希望(以后)是怎样的 代码如下: #the website format{ width:1000px; margin: 0 auto; height:100%; text-align:left; } #menu { width:200px; float:left; padding-left:10px; } #wrapper{ width
#the website format{
width:1000px;
margin: 0 auto;
height:100%;
text-align:left;
}
#menu {
width:200px;
float:left;
padding-left:10px;
}
#wrapper{
width:1000px;
padding-left:10px;
padding-right:10px;
float:left;
}
#content {
float: left;
width: 800px;
padding: 0px;
}
.inside {
width: 220px;
height: 350px;
padding: 5px;
float:right;
display:inline-block;
margin:5px;
}
看一看,这是你想要的样子吗
HTML
<div class='table'>
<div class='cell'>Menu</div>
<div class='cell'>Content</div>
</div>
body, html{
width:100%;
height:100%;
margin:0;
padding:0;
}
body{
position:fixed;
}
.table{
display:table;
height:100%;
width:100%;
}
.cell{
display:table-cell;
border:1px solid grey;
}
.cell:first-child{
width:100px;
}