So I wrote a Web Application which has three div´s. One for the headline under that one on the left with a menu and next to that one in which the content will be loaded.
So I don´t want to set a static width and the content´s
length changes. I have tried with overflow:auto
but that did not work.
CSS:
body {
margin: 0;
padding:0;
height:100%;
}
.area-header {
height:40px;
background-color:#71A4C3;
margin-bottom: 20px;
margin-left:20px;
margin-right:20px;
}
.area-menu {
width:300px;
margin-left:20px;
background-color:#8BC6EA;
display:inline-block;
margin-bottom:auto;
padding-bottom:100%;
height:100%;
}
.area-content {
display:inline-block;
position:absolute;
margin-right:20px;
margin-left:20px;
}
HTML:
<body>
<div id="area-header" class="area-header">
<h2>A Web Application!</h2>
</div>
<div id="area-menu" class="area-menu">
<ul id="menu">
@foreach (WebApplicationWithSqlAndJS.Models.MenuItem item in Model)
{
<li id="menu-item"><a href="@item.Target" onclick="return false">@item.Title</a></li>
}
</ul>
</div>
<div id="area-content" class="area-content"></div>
</body>