Position layout to have div next to my section - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Layout

Description

Position layout to have div next to my section

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <title>Lorem ipsum dolor sit amet, consectetur</title> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
header {<!-- ww  w  . j  a v  a2  s. c  o m-->
   color:Chartreuse;
   text-align:center;
   padding:6px;
   display:block;
}

#wrapper {
   width:701px;
   margin:0 auto;
}

#nav {
   width:501px;
   margin:0 auto;
   list-style-type:none;
   white-space:nowrap;
   display:block;
}

#nav {
   padding:11px 0;
   width:501px;
   margin:0 auto;
   text-align:center;
   list-style-type:none;
   display:block;
   -webkit-box-shadow:0 3px 11px -13px yellow;
   -moz-box-shadow:0 9px 7px -7px blue;
   box-shadow:0 9px 7px -7px pink;
}

#nav li {
   display:inline-block;
}

#nav a {
   text-align:center;
   text-decoration:none;
   padding:6px;
}

aside {
   padding:6px;
   height:201px;
   width:100px;
}

section {
   width:201px;
   padding:6px;
}

aside, section {
   display:inline-block;
   vertical-align:top;
   border:2px dotted OrangeRed;
   word-wrap:break-word;
}

#wrapper {
   text-align:center;
}
</style> 
 </head> 
 <body> 
  <header>
    Lorem ipsum 
  </header> 
  <ul id="nav"> 
   <li> <a href="#">Lorem</a> </li> 
   <li> <a href="#">Lorem i</a> </li> 
   <li> <a href="#">Lorem ipsu</a> </li> 
   <li> <a href="#">Lorem </a> </li> 
   <li> <a href="#">Lorem i</a> </li> 
  </ul> 
  <div id="wrapper"> 
   <aside>
     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volu 
   </aside> 
   <section>
     Lorem ipsum dolor sit amet, consectetur ad 
   </section> 
  </div>  
 </body>
</html>

Related Tutorials