css - need to change dropdown menu to full length -


i need dropdown run full length of menu, there easy way without restructuring menu?

thanks.

example - jsfiddle

#menu {     list-style:none;     width:940px;     margin:30px auto 0px auto;     height:43px;     padding:0px 20px 0px 20px;  }  #menu li {     float:left;     display:block;     text-align:center;     position:relative;     padding: 4px 10px 4px 10px;     margin-right:30px;     margin-top:7px;     border:none; } 

i'm not sure if it's "easy" method, i've modified jsfiddle purpose - no html mods needed.
html:

<ul id="menu">      <li><a href="#" class="drop">home</a><!-- begin home item -->          <div class="dropdown_2columns"><!-- begin 2 columns container -->              <div class="col_2">                 <h2>welcome !</h2>             </div>              <div class="col_2">                 <p>hi , welcome here ! showcase of possibilities of awesome mega drop down menu.</p>                              <p>this item comes large range of prepared typographic stylings such headings, lists, etc.</p>                          </div>              <div class="col_2">                 <h2>cross browser support</h2>             </div>              <div class="col_1">                 <img src="img/browsers.png" width="125" height="48" alt="" />             </div>              <div class="col_1">                 <p>this mega menu has been tested in major browsers.</p>             </div>          </div><!-- end 2 columns container -->      </li><!-- end home item -->      <li><a href="#" class="drop">features</a><!-- begin 5 columns item -->          <div class="dropdown_5columns"><!-- begin 5 columns container -->              <div class="col_5">                 <h2>this example of large container 5 columns</h2>             </div>              <div class="col_1">                 <p class="black_box">this dark grey box text. fusce in metus @ enim porta lacinia vitae arcu. sed sed lacus nulla mollis porta quis.</p>             </div>              <div class="col_1">                 <p>phasellus vitae sapien ac leo mollis porta quis sit amet nisi. mauris hendrerit, metus cursus accumsan tincidunt.</p>             </div>              <div class="col_1">                 <p class="italic">this sample of italic text. consequat scelerisque. fusce sed lectus @ arcu mollis accumsan @ nec nisi porta quis sit amet.</p>             </div>              <div class="col_1">                 <p>curabitur euismod gravida ante nec commodo. nunc dolor nulla, semper in ultricies vitae, vulputate porttitor neque.</p>             </div>              <div class="col_1">                 <p class="strong">this sample of bold text. aliquam sodales nisi nec felis hendrerit ac eleifend lectus feugiat scelerisque.</p>             </div>              <div class="col_5">                 <h2>here content side images</h2>             </div>              <div class="col_3">                  <img src="img/01.jpg" width="70" height="70" class="img_left imgshadow" alt="" />                 <p>maecenas eget eros lorem, nec pellentesque lacus. aenean dui orci, rhoncus sit amet tristique eu, tristique sed odio. praesent ut interdum elit. sed in sem mauris. aenean commodo mi. praesent augue lacus.<a href="#">read more...</a></p>                  <img src="img/02.jpg" width="70" height="70" class="img_left imgshadow" alt="" />                 <p>aliquam elementum felis quis felis consequat scelerisque. fusce sed lectus @ arcu mollis accumsan @ nec nisi. aliquam pretium mollis fringilla. nunc in leo urna, eget varius metus. aliquam sodales nisi.<a href="#">read more...</a></p>              </div>              <div class="col_2">                  <p class="black_box">this black box, can use highligh content. sed sed lacus nulla, et lacinia risus. phasellus vitae sapien ac leo mollis porta quis sit amet nisi. mauris hendrerit, metus cursus accumsan tincidunt.quisque vestibulum nisi non nunc blandit placerat. mauris facilisis, risus ut lobortis posuere, diam lacus congue lorem, ut condimentum ligula est vel orci. donec interdum lacus @ velit varius gravida. nulla ipsum risus.</p>              </div>          </div><!-- end 5 columns container -->      </li><!-- end 5 columns item -->      <li><a href="#" class="drop">solutions</a><!-- begin 4 columns item -->          <div class="dropdown_4columns"><!-- begin 4 columns container -->              <div class="col_4">                 <h2>this heading title</h2>             </div>              <div class="col_1">                  <h3>some links</h3>                 <ul>                     <li><a href="#">themeforest</a></li>                     <li><a href="#">graphicriver</a></li>                     <li><a href="#">activeden</a></li>                     <li><a href="#">videohive</a></li>                     <li><a href="#">3docean</a></li>                 </ul>                 </div>              <div class="col_1">                  <h3>useful links</h3>                 <ul>                     <li><a href="#">nettuts</a></li>                     <li><a href="#">vectortuts</a></li>                     <li><a href="#">psdtuts</a></li>                     <li><a href="#">phototuts</a></li>                     <li><a href="#">activetuts</a></li>                 </ul>                 </div>              <div class="col_1">                  <h3>other stuff</h3>                 <ul>                     <li><a href="#">freelanceswitch</a></li>                     <li><a href="#">creattica</a></li>                     <li><a href="#">workawesome</a></li>                     <li><a href="#">mac apps</a></li>                     <li><a href="#">web apps</a></li>                 </ul>                 </div>              <div class="col_1">                  <h3>misc</h3>                 <ul>                     <li><a href="#">design</a></li>                     <li><a href="#">logo</a></li>                     <li><a href="#">flash</a></li>                     <li><a href="#">illustration</a></li>                     <li><a href="#">more...</a></li>                 </ul>                 </div>          </div><!-- end 4 columns container -->      </li><!-- end 4 columns item -->      <li class="menu_right"><a href="#" class="drop">blog</a>          <div class="dropdown_1column align_right">                  <div class="col_1">                      <ul class="simple">                         <li><a href="#">freelanceswitch</a></li>                         <li><a href="#">creattica</a></li>                         <li><a href="#">workawesome</a></li>                         <li><a href="#">mac apps</a></li>                         <li><a href="#">web apps</a></li>                         <li><a href="#">nettuts</a></li>                         <li><a href="#">vectortuts</a></li>                         <li><a href="#">psdtuts</a></li>                         <li><a href="#">phototuts</a></li>                         <li><a href="#">activetuts</a></li>                         <li><a href="#">design</a></li>                         <li><a href="#">logo</a></li>                         <li><a href="#">flash</a></li>                         <li><a href="#">illustration</a></li>                         <li><a href="#">more...</a></li>                     </ul>                     </div>          </div>      </li>      <li class="menu_right"><a href="#" class="drop">about</a><!-- begin 3 columns item -->          <div class="dropdown_3columns align_right"><!-- begin 3 columns container -->              <div class="col_3">                 <h2>lists in boxes</h2>             </div>              <div class="col_1">                  <ul class="greybox">                     <li><a href="#">freelanceswitch</a></li>                     <li><a href="#">creattica</a></li>                     <li><a href="#">workawesome</a></li>                     <li><a href="#">mac apps</a></li>                     <li><a href="#">web apps</a></li>                 </ul>                 </div>              <div class="col_1">                  <ul class="greybox">                     <li><a href="#">themeforest</a></li>                     <li><a href="#">graphicriver</a></li>                     <li><a href="#">activeden</a></li>                     <li><a href="#">videohive</a></li>                     <li><a href="#">3docean</a></li>                 </ul>                 </div>              <div class="col_1">                  <ul class="greybox">                     <li><a href="#">design</a></li>                     <li><a href="#">logo</a></li>                     <li><a href="#">flash</a></li>                     <li><a href="#">illustration</a></li>                     <li><a href="#">more...</a></li>                 </ul>                 </div>              <div class="col_3">                 <h2>here image examples</h2>             </div>              <div class="col_3">                 <img src="img/02.jpg" width="70" height="70" class="img_left imgshadow" alt="" />                 <p>maecenas eget eros lorem, nec pellentesque lacus. aenean dui orci, rhoncus sit amet tristique eu, tristique sed odio. praesent ut interdum elit. maecenas imperdiet, nibh vitae rutrum vulputate, lorem sem condimentum.<a href="#">read more...</a></p>                  <img src="img/01.jpg" width="70" height="70" class="img_left imgshadow" alt="" />                 <p>aliquam elementum felis quis felis consequat scelerisque. fusce sed lectus @ arcu mollis accumsan @ nec nisi. aliquam pretium mollis fringilla. vestibulum tempor facilisis malesuada. <a href="#">read more...</a></p>             </div>          </div><!-- end 3 columns container -->      </li><!-- end 3 columns item -->   </ul>    

css:

/* navigation bar */  #menu {     list-style:none;     width:940px;     margin:30px auto 0px auto;     height:43px;     padding:0px 20px 0px 20px;  }  #menu li {     float:left;     display:block;     text-align:center;     padding: 4px 10px 4px 10px;     margin-right:30px;     margin-top:7px;     border:none; }  #menu li:hover {     border: 2px  solid #eeeeee;     padding: 4px 9px 4px 9px;      /* background color , gradients */      background: #f4f4f4;     background: -moz-linear-gradient(top, #f4f4f4, #eeeeee);     background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#f4f4f4), to(#eeeeee));  }  #menu li {     font-family:arial, helvetica, sans-serif;     font-size:16px;      color: #f76b04;     display:block;     outline:0;     text-decoration:none; }  /* drop down */  .dropdown_1column,  .dropdown_2columns,  .dropdown_3columns,  .dropdown_4columns, .dropdown_5columns {     margin:4px auto;     float:left;     position:absolute;     left:-999em; /* hides drop down */     text-align:left;     padding:10px 5px 10px 5px;     border:1px solid #eeeeee;     border-top:none;      /* gradient background */     background:#f4f4f4;     background: -moz-linear-gradient(top, #eeeeee, #bbbbbb);     background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#eeeeee), to(#bbbbbb));      /* rounded corners */     -moz-border-radius: 0px 5px 5px 5px;     -webkit-border-radius: 0px 5px 5px 5px;     border-radius: 0px 5px 5px 5px; }  .dropdown_1column {width: 140px;} .dropdown_2columns {width: 280px;} .dropdown_3columns {width: 420px;} .dropdown_4columns {width: 560px;} .dropdown_5columns {width: 700px;}  #menu li:hover .dropdown_1column,  #menu li:hover .dropdown_2columns,  #menu li:hover .dropdown_3columns, #menu li:hover .dropdown_4columns, #menu li:hover .dropdown_5columns {     left:0;     top:auto;     width:100%; } /* columns */  .col_1, .col_2, .col_3, .col_4, .col_5 {     display:inline;     float: left;     position: relative;     margin-left: 5px;     margin-right: 5px; } .col_1 {width:130px;} .col_2 {width:270px;} .col_3 {width:410px;} .col_4 {width:550px;} .col_5 {width:690px;}  /* right alignment */  #menu .menu_right {     float:right;     margin-right:0px; } #menu li .align_right {     /* rounded corners */     -moz-border-radius: 5px 0px 5px 5px;     -webkit-border-radius: 5px 0px 5px 5px;     border-radius: 5px 0px 5px 5px; } #menu li:hover .align_right {     left:auto;     right:-1px;     top:auto; }  /* drop down content stylings */  #menu p, #menu h2, #menu h3, #menu ul li {     font-family:arial, helvetica, sans-serif;     line-height:21px;     font-size:12px;     text-align:left;     text-shadow: 1px 1px 1px #ffffff; } #menu h2 {     font-size:21px;     font-weight:400;     letter-spacing:-1px;     margin:7px 0 14px 0;     padding-bottom:14px;     border-bottom:1px solid #666666; } #menu h3 {     font-size:14px;     margin:7px 0 14px 0;     padding-bottom:7px;     border-bottom:1px solid #888888; } #menu p {     line-height:18px;     margin:0 0 10px 0; }  #menu li:hover div {     font-size:12px;     color:#261b13; } #menu li:hover div a:hover {     color:#f76b04; } .strong {     font-weight:bold; } .italic {     font-style:italic; } .imgshadow {     background:#ffffff;     padding:4px;     border:1px solid #777777;     margin-top:5px;     -moz-box-shadow:0px 0px 5px #666666;     -webkit-box-shadow:0px 0px 5px #666666;     box-shadow:0px 0px 5px #666666; } .img_left { /* image sticks left */     width:auto;     float:left;     margin:5px 15px 5px 5px; } #menu li .black_box {     background-color:#333333;     color: #eeeeee;     text-shadow: 1px 1px 1px #000;     padding:4px 6px 4px 6px;      /* rounded corners */     -moz-border-radius: 5px;     -webkit-border-radius: 5px;     border-radius: 5px;      /* shadow */     -webkit-box-shadow:inset 0 0 3px #000000;     -moz-box-shadow:inset 0 0 3px #000000;     box-shadow:inset 0 0 3px #000000; } #menu li ul {     list-style:none;     padding:0;     margin:0 0 12px 0; } #menu li ul li {     font-size:12px;     line-height:24px;     position:relative;     text-shadow: 1px 1px 1px #5e5b59;     padding:0;     margin:0;     float:none;     text-align:left;     width:130px; } #menu li ul li:hover {     background:none;     border:none;     padding:0;     margin:0; } #menu li .greybox li {     background:#f4f4f4;     border:1px solid #bbbbbb;     margin:0px 0px 4px 0px;     padding:4px 6px 4px 6px;     width:116px;     text-shadow: 1px 1px 1px #eeeeee;      /* rounded corners */     -moz-border-radius: 5px;     -webkit-border-radius: 5px;     border-radius: 5px; } #menu li .greybox li:hover {     background:#ffffff;     border:1px solid #aaaaaa;     padding:4px 6px 4px 6px;     margin:0px 0px 4px 0px; }    

you'll need adjust submenu's content accomodate changes.


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -