orinoco74 orinoco74 - 3 months ago 34
CSS Question

align content to top in div

I'm not a clever man, just trying to make a responsive page with a left sidebar, so far that's okay, but I cannot figure out how to align the content of the main div to the top.

This is the code: https://jsfiddle.net/kissja74/df8vkn2a/

#content {
position: relative;
max-width: 400px;
margin: 0 auto;

#menu {
position: relative;
width: 50px;
height: 30px;
margin-left: -50px;
background-color: blue;

<div id='content'>
<div id='menu'>menu</div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi interdum porttitor accumsan. Aliquam at egestas lacus, sed ultrices dui.</p>


Add to your style

#menu {float: left}