orinoco74
orinoco74

Reputation: 5

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>
    </div>


   

Upvotes: 0

Views: 82

Answers (1)

Daniela Donna
Daniela Donna

Reputation: 270

Add to your style

#menu {float: left}

Upvotes: 4

Related Questions