html - Alignment troubles in CSS -


i know website looks pretty crappy. it's work in progress! have no prior html or css experience.

the specific part struggling right how name in site header not aligned links , images. have tried multiple solutions regarding alignment (setting line-height, vertical-align, etc.) nothing working. don't see why starting far header/top of page.

here relevant css:

.header {     margin: 0;     background: #1c1c1c;     text-align: left;     position: absolute;     top: 0;     left: 0;     width: 100%;     height: 60px;     padding: 0;     background: #101010; }  .header h1 {     display: inline;     color: #ffffff; }  .header ul {     display: inline; }  .header ul li {     display: inline; }  .header ul li a:hover {     opacity: 0.5;     background: none; }  .header ul li {     display: inline;     padding: 0 0.2em;     opacity: 0.25; }  .header ul li a:hover {     opacity: 1; }  .header p {     background: #1c1c1c; } 

here relevant html:

<div class="header">                 <h1>kyle parker</h1>                  <ul>                     <li>                         <a href="http://www.linkedin.com/pub/kyle-parker/54/16b/965/" title="my resume on linkedin">                             <img src="img/icon-linkedin.png" alt="linkedin" />                         </a>                     </li>                     <li>                         <a href="https://twitter.com/kylesparker" title="follow me on twitter">                             <img src="img/icon-twitter.png" alt="twitter" />                         </a>                     </li>                 </ul>             </div> 

can maybe tell me how fix little explanation? thanks!!

try this: http://codepen.io/pageaffairs/pen/pkfig

<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <style>  body {margin: 0; padding: 0;}  .header {     margin: 0;     background: #1c1c1c;     text-align: left;     top: 0;     left: 0;     width: 100%;     padding: 0;     background: #101010; }  .header h1 {     display: inline-block; vertical-align: middle;     color: #ffffff; }  .header ul {     display: inline-block; vertical-align: middle; }  .header ul li {     display: inline; }  .header ul li a:hover {     opacity: 0.5;     background: none; }  .header ul li {     display: inline;     padding: 0 0.2em;     opacity: 0.25; }  .header ul li a:hover {     opacity: 1; }  .header p {     background: #1c1c1c; }  </style> </head> <body>  <div class="header">     <h1>kyle parker</h1>      <ul>         <li>             <a href="http://www.linkedin.com/pub/kyle-parker/54/16b/965/" title="my resume on linkedin">                 <img src="http://placehold.it/60x60" alt="linkedin" />             </a>         </li>         <li>             <a href="https://twitter.com/kylesparker" title="follow me on twitter">                 <img src="http://placehold.it/60x60" alt="twitter" />             </a>         </li>     </ul> </div>  </body> </html> 

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -