css - Can not display the list and h1 tag on the same line -



trying make webpage menu list , logo side side. in code below whenever try make them side side 1 of them moves down on page.i want both list , heading side side.here code,

<!doctype html> <html dir="ltr" lang="en-uk">      <head>         <meta http-equiv="content-type" content="text/html; charset=utf-8" />         <title>fahad | web designer</title>         <!--styling starts-->     </script>         <style type="text/css">              <link href='http://fonts.googleapis.com/css?family=chewy&v1' rel='stylesheet'               type='text/css'>             h1 { font-family: 'chewy', arial, serif;              }              h1 {                  font-size:45px;                   padding-top:70px;                  padding-left:350px;              }             .menu              {                 padding:0;                 margin-left:0;                   height:200px;                 width:300px;             }               .menu ul              {                 padding-left:200px;                 padding-top:45px;                 font:verdana, geneva, sans-serif;                 list-style-type:none;                 text-decoration:none;                 color:#666;               }               .container               {                 color:#666;                }               a:link               {                  color:#666;               }               a:hover               {                  color:#333;               }               a:active               {                 color:#666;               }       </style>      </head>     <body>         <div class="container">        <h1>fahad</h1>               <div class="menu">              <ul>                 <li><a>home</a> </li>                     <li><a>blog</a></li>                 <li><a>about</a></li>                 <li><a>contact</a></li>               </ul>              </div><!--logo div ends-->          </div><!--container div ends-->     </body> </html> 

please me out. thank you.

to make 2 (or more) sibling elements appear in 1 line, can use inline-block value. apply display:inline-block elements.

live demo: http://jsfiddle.net/dcs4u/


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -