html - align content to top in div -


i'm not clever man, trying make responsive page left sidebar, far that's okay, cannot figure out how align content of main div top.

this 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 @ egestas lacus, sed ultrices dui.</p>      </div>         

add style

#menu {float: left} 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -