Solved

css drop down menu

Posted on 2016-10-28
1
48 Views
Last Modified: 2016-11-01
I have a dropdown menu which has only one level,

what should I do to add another level for listing?

my code is:
@charset "utf-8";
/* CSS Document */

/*burası ana divin özellikleri*/
#navMenu {
    margin:0;
    width:auto;
	background-color:#FFF;
 }

  #navMenu ul {
    margin:0;
    padding:0;
    line-height:36px;
 }

  #navMenu li {
	margin:0;
	padding:0;
	list-style:none;
	float:left;
	position:relative;
	background-color:#FFF;
	
/*	width:160px; bu ölçü her bir kutunun ölçüsünü veriyor
*/ }

  #navMenu ul li a {
	text-align:center;
	height:36px;
	width:auto;
	padding-left:42px;  /*burada kutular içindeki text'in paddingini veriyor */
	padding-right:42px;	/*burada kutular içindeki text'in paddingini veriyor */
	display:block;
	background-color:#FFF; /*BURASI BACKGROUND RENGİNİ VERİYOR */
	text-decoration:none;
	color:#0D4B64;
	font-weight:bold;
	text-decoration:none;
	line-height:36px; /*burada kutular içindeki yazıların yüksekliğini yani dikey olarak ortada mıyı veriyior */
	border-top-width: 0px;
	border-right-width: 0px;
	border-bottom-width: 0px;
	border-left-width: 1px;
	border-top-style: solid;
	border-right-style: solid;
	border-bottom-style: solid;
	border-left-style: solid;
	border-top-color: #DDFEC8;
	border-right-color: #DDFEC8;
	border-bottom-color: #DDFEC8;
	border-left-color: #DDFEC8;
	font-family: Arial, Geneva, sans-serif;
	font-size: 0.78em;
 }

  #navMenu ul ul {
    position:absolute;
    visibility:hidden;
    top:30px;
	
 }
   /* Changes text color on hover for main menu hover
  BURASI EN ÜSTEKİ MENÜNÜN HOVER HALİNDE ALDIĞI RENK, YAZI VE BACKGROUND
  */

  #navMenu a:hover {
	background-color:#CCC;
	color:#0D4B64;
	border-top-width: 0px;
	font-size: 0.78em;
	font-weight:bold;
 } 
 
/* Bu alan açılan alt menünün tüm özelliklerini kapsıyor. 
*/ #navMenu ul li ul li a {
	text-align:left;
	height:36px; /*burayı düzeltirsem 112.satırı da düzeltmeliyim*/
	width:auto;
	padding-left:6px; 
	padding-right:6px;
	display:block;
	color:#0D4B64;
	font-family:Arial, Geneva, sans-serif;
	font-weight:bolder;
	text-decoration:none;
	font-size: 0.78em;
	color:#0D4B64;
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 0px;
	border-left-width: 1px;
	border-top-style: solid;
	border-right-style: solid;
	border-bottom-style: solid;
	border-left-style: solid;
	border-top-color: #DDFEC8;
	border-right-color: #DDFEC8;
	border-bottom-color: #DDFEC8;
	border-left-color: #DDFEC8;

 }

  #navMenu ul li:hover ul {
    visibility:visible;
    z-index:9999; 
 }


  #navMenu li ul li {
width:140px; /*bu alan da alt kutuların genişlik ölçüsünü veriyor*/
height:36px;
 }
 
  /**********************************************/

  /*sets top level hover color*/

  #navMenu li:hover {
	background-color:#FFF;
	
	 }

  /*sets link items hover color and background
  BURASI ÜZERİNDE GELDİĞİNDE AŞAĞIYA DOĞRU AÇILAN MENÜNÜN AYARLARI
  */

  #navMenu ul li:hover  {
	color:#A2E6FC; /*bu ayar font rengini veriyor*/
	background-color:#FFF;

 }


  
 /* Contains the Float */

 .clearFloat {
    clear:both; 
    margin:0;
    padding:0;
 }

 /* IE7 Display Fix */  
 
 #navmenu ul li {

  display: inline;     
 
 }

Open in new window

0
Comment
Question by:Braveheartli
1 Comment
 
LVL 22

Accepted Solution

by:
Kim Walker earned 500 total points
ID: 41864899
This appears to have multi-level styling. Just be sure to format the HTML for the second level appropriately. Something similar to the following.
<div id="navmenu">
    <ul>
        <li>Top Level 1
            <ul>
                <li>Second Level 1a</li>
            </ul>
        </li>
        <li>Top Level 2
            <ul>
                <li>Second Level 2a</li>
                <li>Second Level 2b</li>
            </ul>
        </li>
    </ul>
</div>

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now