html - How do i place this menu at the bottom right of its parent div? -


i've been trying absolutely position navigation @ bottom right of parent div (header>nav>menu) , i'm little lost. appreciated!

i've been trying relatively position parent div, each property try, either disappears browser, aligns way @ bottom right of page , not parent div, or somewhere else i'm not wanting go.

<!doctype html> <html> <head> <meta charset="utf-8"> <title></title> <link href="css/style.css" rel="stylesheet" type="text/css"> <link rel="shortcut icon" href="images/favicon.png" /> </head>  <body>      <div id="wrapper">          <header>             <div class="logo">                 <img src="images/logo.png" / id="logo">             </div>             <nav>                 <ul id="menu">                     <li><a href="index.html">home</a></li>                     <li><a href="portfolio.html">portfolio</a></li>                     <li><a href="career.html">career</a></li>                     <li><a href="contact.html">contact</a></li>                 </ul>                          </nav>         </header>      </div>  </body> </html>  body {     margin:auto;     width:960px; }  .logo {     display:block;     float:left;     width:242px;     height:141px;     margin:0px; }    #header {     position:relative;     height:100%; }  #nav .menu {     position:absolute;     bottom:0px;     right:0px;     margin:0px;     padding:0px;     float:right; }  #menu ul {     list-style:none; }  #menu li {     display:inline;     float:left; }  #menu {     display:block;     width:120px;     font-weight:bold;     color:#ffffff;     background-color:#98bf21;     text-align:center;     padding:4px;     text-decoration:none;     text-transform:uppercase; }  #menu a:hover,a:active { background-color:#7a991a; } 

you made mistakes,

  1. you use #header in css don't put id header <header> tag,
  2. you use #nav in css instead of nav tag because there no id in nav tag,
  3. #header height 100%. take height of parent. put height:auto; take height need fit content.

i made jsfiddle. please check. hope solve problem.

http://jsfiddle.net/banded_krait/q4zjj/


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -