Solved

css drop down menu

Posted on 2016-10-28
1
55 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

809 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