Drop Down navi is not working ie 7? - html

I have make a new dropdown navi in css .
Chrome, firefox, safari is running fine but IE7 is not show of drop-down .
css
.cl{clear:both;}
#navi{
background:#0082c8;
position:relative;
margin-top:15px;
}
#navi:after{
position:absolute;
content:"";
left:0;
right:0;
top:0;
height:5px;
background:#00a7ff;
border-top:1px solid #0285cb;
border-bottom:2px solid #0068a6;
box-shadow:inset 0 0 0 1px #26c6f8;
}
#navi:before{
position:absolute;
content:"";
left:0;
right:0;
bottom:0;
height:5px;
background:#00a7ff;
border-top:1px solid #0285cb;
border-bottom:2px solid #0068a6;
box-shadow:inset 0 0 0 1px #26c6f8;
}
#navi > li{
float:left;
margin:0 10px;
position:relative;
padding:14px 0;
}
#navi li a, .subnavi li a{
color:white;
text-decoration:none;
display:inline-block;
line-height:29px;
padding:0 13px;
font-size:16px;
font-family:arial;
text-shadow: 0px 2px 2px #034e9f;
filter: dropshadow(color=#034e9f, offx=0, offy=2);
}
#navi > li:hover > a, li:hover > a , #navi li a.active{
background:#055c9f;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: inset 0px 3px 3px 0px #042960;
-moz-box-shadow: inset 0px 3px 3px 0px #042960;
box-shadow: inset 0px 3px 3px 0px #042960;
border:1px solid #009ada;
color:#f7cf00;
line-height:27px;
padding:0 12px;
}
.subnavi{
position:absolute;
display:none;
top:51px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0px 0px 3px 1px #979395;
-moz-box-shadow: 0px 0px 3px 1px #979395;
box-shadow: 0px 0px 3px 1px #979395;
background:#0082c8;
border:1px solid #005890;
padding:10px 0;
white-space:nowrap;
}
#navi li:hover .subnavi{
display:block;
}
#navi .subnavi li{
margin:0;
}
#navi .subnavi li a{
display:block;
font-size:13px;
padding:0 15px;
border-radius:0;
line-height:27px;
}
#navi .subnavi li a:hover{
padding:0 15px;
border-radius:0;
border-left:0;
border-right:0;
line-height:25px;
}
​
HTML
<ul id="navi">
<li>About</li>
<li>Services
<ul class="subnavi">
<li>Web Development</li>
<li>WordPress</li>
<li>Graphic Design</li>
<li>Icon Design</li>
<li>Motion Graphics</li>
</ul>
</li>
<li>Works</li>
<div class="cl"></div>
</ul>​
Link here http://jsfiddle.net/rohitazad/3qPbE/11/

Hi This is not the answer but its just a thought from my side.
Insted of using float: left; you can try with display:inline-block; and add hack for IE:
Zoom:1;
*display:inline;
Try just this. If its working Try next time onwards Disply:inline-block;

Related

align center and center tag are not working

i am trying to show pagination in center but its show on left side. i am also try center tag and align=center attributes but its not working....
Pagination show in the center of page
#pagination {
margin: 40 40 0;
float: left;
}
ul.tsc_pagination li a {
border:solid 1px;
border-radius:3px;
-moz-border-radius:3px;
-webkit-border-radius:3px;
padding:6px 9px 6px 9px;
}
ul.tsc_pagination li {
padding-bottom:1px;
}
ul.tsc_pagination li a:hover,
ul.tsc_pagination li a.current {
color:#FFFFFF;
box-shadow:0px 1px #EDEDED;
-moz-box-shadow:0px 1px #EDEDED;
-webkit-box-shadow:0px 1px #EDEDED;
}
ul.tsc_pagination {
margin:4px 0;
padding:0px;
height:100%;
overflow:hidden;
font:12px 'Tahoma';
list-style-type:none;
}
ul.tsc_pagination li {
float:left;
margin:0px;
padding:0px;
margin-left:5px;
}
ul.tsc_pagination li a {
color:black;
display:block;
text-decoration:none;
padding:7px 10px 7px 10px;
}
ul.tsc_pagination li a img {
border:none;
}
ul.tsc_pagination li a {
color:#0A7EC5;
border-color:#8DC5E6;
background:#F8FCFF;
}
ul.tsc_pagination li a:hover,
ul.tsc_pagination li a.current {
text-shadow:0px 1px #388DBE;
border-color:#3390CA;
background:#58B0E7;
background:-moz-linear-gradient(top, #B4F6FF 1px, #63D0FE 1px, #58B0E7);
background:-webkit-gradient(linear, 0 0, 0 100%, color-stop(0.02, #B4F6FF), color-stop(0.02, #63D0FE), color-stop(1, #58B0E7));
}
<div id="pagination">
<ul class="tsc_pagination">
<!-- Show pagination links -->
<li></li>
<li><a class="current">1</a></li>
<li>2</li>
<li>Next</li>
<li></li>
</ul>
</div>
you can see this
Remove Float:left from li and add display:inline-block
#pagination{
margin: 40 40 0;
float: left;
width:100%;
}
ul.tsc_pagination li a{
border:solid 1px;
border-radius:3px;
-moz-border-radius:3px;
-webkit-border-radius:3px;
padding:6px 9px 6px 9px;
}
ul.tsc_pagination li{
padding-bottom:1px;
}
ul.tsc_pagination li a:hover,
ul.tsc_pagination li a.current{
color:#FFFFFF;
box-shadow:0px 1px #EDEDED;
-moz-box-shadow:0px 1px #EDEDED;
-webkit-box-shadow:0px 1px #EDEDED;
}
ul.tsc_pagination{
margin:4px 0;
padding:0px;
height:100%;
overflow:hidden;
font:12px 'Tahoma';
list-style-type:none;
text-align:center;
}
ul.tsc_pagination li{
display:inline-block;
margin:0px;
padding:0px;
margin-left:5px;
}
ul.tsc_pagination li a{
color:black;
display:block;
text-decoration:none;
padding:7px 10px 7px 10px;
}
ul.tsc_pagination li a img{
border:none;
}
ul.tsc_pagination li a{
color:#0A7EC5;
border-color:#8DC5E6;
background:#F8FCFF;
}
ul.tsc_pagination li a:hover,
ul.tsc_pagination li a.current{
text-shadow:0px 1px #388DBE;
border-color:#3390CA;
background:#58B0E7;
background:-moz-linear-gradient(top, #B4F6FF 1px, #63D0FE 1px, #58B0E7);
background:-webkit-gradient(linear, 0 0, 0 100%, color-stop(0.02, #B4F6FF), color-stop(0.02, #63D0FE), color-stop(1, #58B0E7));
}
<div id="pagination">
<ul class="tsc_pagination">
<!-- Show pagination links -->
<li></li>
<li><a class="current">1</a></li>
<li>2</li>
<li>Next</li>
<li></li>
</ul>
</div>
There are 2 changes to make.
Change 1- Change css of #pagination to below.
#pagination {
width: 100%;
text-align: center;
}
Change 2- Make the ul.tsc_pagination li not have float instead of
that use display:inline-block. Change css as below.
ul.tsc_pagination li {
/* float: left;*/
/*Dont use float:left*/
display: inline-block;
margin: 0px;
padding: 0px;
margin-left: 5px;
}
#pagination {
width: 100%;
text-align: center;
}
ul.tsc_pagination li a {
border: solid 1px;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
padding: 6px 9px 6px 9px;
}
ul.tsc_pagination li {
padding-bottom: 1px;
}
ul.tsc_pagination li a:hover,
ul.tsc_pagination li a.current {
color: #FFFFFF;
box-shadow: 0px 1px #EDEDED;
-moz-box-shadow: 0px 1px #EDEDED;
-webkit-box-shadow: 0px 1px #EDEDED;
}
ul.tsc_pagination {
margin: 4px 0;
padding: 0px;
height: 100%;
overflow: hidden;
font: 12px 'Tahoma';
list-style-type: none;
}
ul.tsc_pagination li {
/* float: left;*/
/*Dont use float:left*/
display: inline-block;
margin: 0px;
padding: 0px;
margin-left: 5px;
}
ul.tsc_pagination li a {
color: black;
display: block;
text-decoration: none;
padding: 7px 10px 7px 10px;
}
ul.tsc_pagination li a img {
border: none;
}
ul.tsc_pagination li a {
color: #0A7EC5;
border-color: #8DC5E6;
background: #F8FCFF;
}
ul.tsc_pagination li a:hover,
ul.tsc_pagination li a.current {
text-shadow: 0px 1px #388DBE;
border-color: #3390CA;
background: #58B0E7;
background: -moz-linear-gradient(top, #B4F6FF 1px, #63D0FE 1px, #58B0E7);
background: -webkit-gradient(linear, 0 0, 0 100%, color-stop(0.02, #B4F6FF), color-stop(0.02, #63D0FE), color-stop(1, #58B0E7));
}
<div id="pagination">
<ul class="tsc_pagination">
<!-- Show pagination links -->
<li></li>
<li><a class="current">1</a></li>
<li>2</li>
<li>Next</li>
<li></li>
</ul>
</div>
try this one https://jsfiddle.net/g3643p4q/4/
only mansion
ul.tsc_pagination li {
display: inline-block;
float: none;
margin: 0 0 0 5px;
padding: 0;
}
ul.tsc_pagination {
font: 12px "Tahoma";
height: 100%;
list-style-type: none;
margin: 0 auto;
overflow: hidden;
padding: 0;
text-align: center;
}
#pagination {
float: none;
}

I want to put hover on background and text color at a time

I need to put hover at a time on background and text color.. please tell me how could i do this...When i hover, i want to change the text color and background .. which property should i apply
here is my code and image.
http://s29.postimg.org/i0ivezr07/image.jpg
.menu{
height:65px;
width:100%;
background-color:#cccc99;
box-shadow:0px 1px 2px #000000;
-moz-box-shadow: 0px 1px 2px #000000;
-webkit-box-shadow: 0px 1px 2px #000000;
}
.logo{
float:left;
margin: 5px 6px;
position:relative;
}
.menu-text{
float:right;
width:570px;
margin: -8px 0px;
}
.menu-text ul{
list-style:none;
}
.menu-text ul li{
float:left;
height:60px;
width:94px;
line-height: 60px;
border-right:1px solid #e6e6e6;
text-align: center;
font-size:16px;
font-weight:bold;
text-shadow: 0px 1px 2px #757575;
}
.menu-text ul li:hover{
}
.menu-text ul li:last-child{
border:none;
}
.menu-text ul li a{
text-decoration:none;
color: #333333;
}
.menu-text ul li a:hover{
}
.menu-text ul li a:hover ul li:hover{
background-color:#FFF;
color:#FFF;
}
.menu-belt{
width:100%;
height:10px;
background:#cccc99;
box-shadow:0px -1px 2px #a9a9a9;
-webkit-box-shadow: 0px -1px 2px #a9a9a9;
-moz-box-shadow: 0px -1px 2px #a9a9a9;
float:left;
margin: -13px 0;
}
<div class="menu">
<div class="logo">
<a href="#">
<img src="images/logo.png" alt="logo" />
</a>
</div> <!--/logo-->
<div class="menu-text">
<ul>
<li> Home</li>
<li> Operator</li>
<li> Drive </li>
<li> Booking </li>
<li> Rider </li>
<li> Logout </li>
</ul>
</div> <!--/menu-text-->
<div class="menu-belt">
</div> <!--menu-belt-->
</div> <!--/menu-->
Just add it on the :hover
.menu-text ul li a:hover{
color: red;
background-color: green;
}
:hover is the css used when the mouse if hovering on the element.
Use :hover property for CSS
Syntax:
classname:hover{ property1:value; property2:value;)
.menu{
height:65px;
width:100%;
background-color:#cccc99;
box-shadow:0px 1px 2px #000000;
-moz-box-shadow: 0px 1px 2px #000000;
-webkit-box-shadow: 0px 1px 2px #000000;
}
.item1
{
display:block;
border:1px solid #000;
width:60px;
padding:10px;
}
.item1:hover
{
background:lightgreen;
color:white;
}
<div class="menu">
<span class="item1">MENU</span>
</div>
CSS Syntax
classname:hover { color:green; background:red;}
You also have to make the a-tag fill out the whole surrounding li element by adding display:block;
.menu{
height:65px;
width:100%;
background-color:#cccc99;
box-shadow:0px 1px 2px #000000;
-moz-box-shadow: 0px 1px 2px #000000;
-webkit-box-shadow: 0px 1px 2px #000000;
}
.logo{
float:left;
margin: 5px 6px;
position:relative;
}
.menu-text{
float:right;
width:570px;
margin: -8px 0px;
}
.menu-text ul{
list-style:none;
}
.menu-text ul li{
float:left;
height:60px;
width:94px;
line-height: 60px;
border-right:1px solid #e6e6e6;
text-align: center;
font-size:16px;
font-weight:bold;
text-shadow: 0px 1px 2px #757575;
}
.menu-text ul li:hover{
}
.menu-text ul li:last-child{
border:none;
}
.menu-text ul li a{
text-decoration:none;
color: #333333;
display: block; //this makes the a tag fill out the whole surrounding li
}
.menu-text ul li a:hover{
background-color: red; //add this of course....
color: green;
}
.menu-text ul li a:hover ul li:hover{
background-color:#FFF;
color:#FFF;
}
.menu-belt{
width:100%;
height:10px;
background:#cccc99;
box-shadow:0px -1px 2px #a9a9a9;
-webkit-box-shadow: 0px -1px 2px #a9a9a9;
-moz-box-shadow: 0px -1px 2px #a9a9a9;
float:left;
margin: -13px 0;
}
<div class="menu">
<div class="logo">
<a href="#">
<img src="images/logo.png" alt="logo" />
</a>
</div> <!--/logo-->
<div class="menu-text">
<ul>
<li> Home</li>
<li> Operator</li>
<li> Drive </li>
<li> Booking </li>
<li> Rider </li>
<li> Logout </li>
</ul>
</div> <!--/menu-text-->
<div class="menu-belt">
</div> <!--menu-belt-->
</div> <!--/menu-->

CSS3 Navigation submenu is not inheriting its class

I have been playing with CSS3 trying to really understand it and I have not been able to get the behavior of the sub-menu navigation to be correct. Please see http://jsfiddle.net/jllcpp04/9Jpd6/7/ for a working example. The sub-menu still has the bullet points on it and it is not popping up to the right. This is part of a dynamic menu whose width will change depending upon what offices will appear (based on user profile). I would prefer not to set top/right/left/bottom for div location. I also cannot figure out why derivnav is not overriding the nested submenu.
My HTML Code:
<div class="main_nav">
<ul class="nav">
<li>Home
</li>
<li>
<div class="submenu">Office
<div class="subnav">
<h3>Near You</h3>
<ul>
<li>
<div class="deriv">New York
<div class="derivnav">
<ul>
<li>Upper West Side
</li>
<li>Upper East Side
</li>
<li>Lower West Side
</li>
<li>Wallstreet
</li>
</ul>
</div>
</div>
</li>
</ul>
<h3>Not Near You</h3>
<ul>
<li>chicago
</li>
<li>philadelphia
</li>
<li>san francisco
</li>
</ul>
</div>
</div>
</li>
</ul>
Component CSS:
#charset"utf-8";
/* CSS Document */
.main_nav {
width:56%;
text-align:center;
float:left;
display:inline-block;
}
.nav {
list-style:none;
height:43px;
white-space:nowrap;
margin: 0px auto 10px auto;
min-width:775px;
text-align:left;
}
.nav h3 {
font-size:14px;
margin:7px 0 14px 4px;
padding-bottom:7px;
border-bottom:1px solid #888888;
}
.nav h4 {
font-size:12px;
margin:7px 0 14px 4px;
padding-bottom:7px;
border-bottom:1px solid #888888;
}
.nav > li {
border:none;
text-transform:uppercase;
float:left;
position:relative;
margin:5px 3px 5px 2px;
padding:auto;
}
.nav li {
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
color: #333333;
outline:0;
text-decoration:none;
padding-left:10px;
}
.nav li:hover > a, .nav li:hover > p {
color:#cccc66;
}
.nav li .drop {
padding-right:15px;
background:url("drop-nonsel.png") no-repeat right 4px;
}
.nav li:hover .drop, .nav li .drop:hover {
background:url("drop-sel.png") no-repeat right 4px;
}
.nav .subnav {
float:left;
position:absolute;
text-align:left;
padding:5px;
margin: 5px 5px 5px 0;
border:1px solid #CCC;
border-top:none;
white-space:nowrap;
/* Gradient background */
background:#FFFFFF;
/* Rounded Corners */
-moz-border-radius: 0px 5px 5px 5px;
-webkit-border-radius: 0px 5px 5px 5px;
border-radius: 0px 5px 5px 5px;
opacity:0;
transition:visibility 0s linear 0.2s, opacity 0.2s linear;
visibility:hidden;
}
.nav .submenu:hover .subnav, .nav li .subnav:hover {
top:auto;
opacity:1;
visibility:visible;
}
.nav .subnav > ul {
padding:2px;
margin:0 0 12px 0;
}
.nav .subnav > li {
list-style:none;
border-bottom:thin;
font-size:12px;
line-height:24px;
position:relative;
text-shadow: 1px 1px 1px #ffffff;
padding:0;
margin:0;
float:none;
text-align:left;
}
.nav .subnav > li:last-chid {
border-bottom:none;
}
.deriv li .dropr {
padding-right:10px;
background:url("drop-right-nonsel.png") no-repeat right 6px;
}
.deriv li:hover .dropr, .deriv li .dropr:hover {
background:url("drop-right-sel.png") no-repeat right 6px;
}
.subnav .derivnav {
float:right;
position:absolute;
text-align:left;
right:-150px;
padding:5px;
margin: 5px 5px 5px 0;
border:1px solid #CCC;
border-left:none;
white-space:nowrap;
/* Gradient background */
background:#FFFFFF;
/* Rounded Corners */
-moz-border-radius: 0px 5px 5px 5px;
-webkit-border-radius: 0px 5px 5px 5px;
border-radius: 0px 5px 5px 5px;
opacity:0;
transition:visibility 0s linear 0.3s, opacity 0.3s linear;
visibility:hidden;
}
.subnav .derivnav > li {
list-style:none;
border-bottom:thin;
font-size:12px;
line-height:24px;
position:relative;
text-shadow: 1px 1px 1px #ffffff;
padding:0;
margin:0;
float:none;
text-align:left;
}
.subnav li .deriv:hover .derivnav, .subnav li .derivnav:hover {
top:auto;
opacity:1;
visibility:visible;
}
.derivnav ul {
padding:2px;
margin:0 0 12px 0;
}
.derivnav li {
list-style:none;
border-bottom:thin;
font-size:12px;
line-height:24px;
position:relative;
text-shadow: 1px 1px 1px #ffffff;
padding:0;
margin:0;
float:none;
text-align:left;
}
I have been playing with it for a few days and can't seem to figure it out. my CSS3 validates and my html code does as well. Any ideas?
Thanks!
Jon
It worked for me when I removed the > marks from these two lines:
Old version
.nav .subnav > li {
.nav .subnav > li:last-chid {
New version
.nav .subnav li {
.nav .subnav li:last-child {
The > in a CSS selector means that the selected element must be a direct child of the previous element, not just the nearest descendant. In your markup, .subnav is a div, not a ul. The li element simply wasn't selected before, so you're styles were never applied.
If you need the .subnav list styles to be completely separate from the .deriv styles, you could use the > operator like this:
Alternate
.nav .subnav > ul > li {
My fork of the DEMO
i add DEMO
.nav li a {
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
color: #333333;
outline:0;
text-decoration:none;
padding-left:10px;
}

drop down navigation bar

the sub menu is not displaying properly help me please
i want it in CSS and HTML
submenu should be like a list it should be displayed
one down another but it is displaying one after another in same line
after hover on main menu the submenu should be displayed
<style>
#navbar {
position: absolute;
top: 0;
left: 0;
margin: 0;
padding:0;}
#navbar li
{
list-style: none;
float: left;
}
#navbar li a {
display: block;
padding: 3px 8px;
text-transform: uppercase;
text-decoration: none;
color: #999;
font-weight: bold; }
#navbar li a:hover {
color: #000; }
#navbar li ul {
display: none; }
#navbar li:hover ul, #navbar li.hover ul {
position: absolute;
display:list-item;
left: 0;
width: 100%;
margin: 0;
padding: 0; }
</style>
</head>
<body>
<ul id="navbar">
<li>Home</li>
<li>About Us
<ul>
<li>Subitem One</li>
<li>Second Subitem</li>
<li>thrid subitem</li>
</ul>
</li>
<li>Services</li>
<li>Products</li>
<li>Contact</li>
</ul>
add this in your css
#navbar li
{
list-style: none;
float: left;
position:relative;
}
here is jsFiddle file
Live demo
HI now used to this css and created drop down navi in pure css
Css
#navbar{
background:#0082c8;
position:relative;
margin-top:15px;
}
#navbar > li{
float:left;
margin:0 10px;
position:relative;
padding:14px 0;
}
#navbar li a, .subnavi li a{
color:white;
text-decoration:none;
display:inline-block;
line-height:29px;
padding:0 13px;
font-size:16px;
font-family:arial;
text-shadow: 0px 2px 2px #034e9f;
filter: dropshadow(color=#034e9f, offx=0, offy=2);
}
#navbar > li:hover > a, li:hover > a , #navbar li a.active{
background:#055c9f;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: inset 0px 3px 3px 0px #042960;
-moz-box-shadow: inset 0px 3px 3px 0px #042960;
box-shadow: inset 0px 3px 3px 0px #042960;
border:1px solid #009ada;
color:#f7cf00;
line-height:27px;
padding:0 12px;
}
.subnavi{
position:absolute;
display:none;
top:51px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0px 0px 3px 1px #979395;
-moz-box-shadow: 0px 0px 3px 1px #979395;
box-shadow: 0px 0px 3px 1px #979395;
background:#0082c8;
border:1px solid #005890;
padding:10px 0;
white-space:nowrap;
}
#navbar li:hover .subnavi{
display:block;
}
#navbar .subnavi li{
margin:0;
}
#navbar .subnavi li a{
display:block;
font-size:13px;
padding:0 15px;
border-radius:0;
line-height:27px;
}
#navbar .subnavi li a:hover{
padding:0 15px;
border-radius:0;
border-left:0;
border-right:0;
line-height:25px;
}
#navbar:after{
content:'';
clear:both;
display:block;
overflow:hidden;
}
HTML
<ul id="navbar">
<li>About</li>
<li>Demo
<ul class="subnavi">
<li>Demo</li>
<li>Demo</li>
<li>Demo</li>
<li>Demo</li>
<li>Demo</li>
</ul>
</li>
<li>Demo</li>
</ul>
Live demo
Add this style for your submenus:
#navbar li ul li
{
float: none;
}

CSS drop-down submenu text issue

Ok. So I have started to build a website, and I have tried to build a dropdown menu using css and html. The hover function for the submenu works. My only issue is, when you mouse over the menu to get to the submenu, I can't figure out how to change the font to black so it is visible.Here is a page where I am testing the code: http://mcbtaytest.zymichost.com/
Here is my code:
CSS:
body {margin:0;
padding:0;
background:#000000
}
.image{
border: none;
border:0px;
margin:0px;
padding:0px;
z-index: -1;
}
.menu{
border:none;
border:0px;
margin:0px;
padding:0px;
font: 67.5% "Lucida Sans Unicode", "Bitstream Vera Sans", "Trebuchet Unicode MS", "Lucida Grande", Verdana, Helvetica, sans-serif;
font-size:14px;
font-weight:bold;
z-index:2;
}
.menu ul{
background:#FFFFFF;
height:50px;
list-style:none;
margin:0;
padding:0;
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
-webkit-box-shadow: inset 0px 16px 0px 0px rgba(255, 255, 255, .1);
-moz-box-shadow: inset 0px 16px 0px 0px rgba(255, 255, 255, .1);
box-shadow: inset 0px 16px 0px 0px rgba(255, 255, 255, .1);
}
.menu li{
float:left;
padding:0px 0px 0px 15px;
}
.menu li a{
color:#000000;
display:block;
font-weight:normal;
line-height:50px;
margin:0px;
padding:0px 25px;
text-align:center;
text-decoration:none;
}
.menu li a:hover{
background:#000000;
color:#FFFFFF;
text-decoration:none;
-webkit-box-shadow: inset 0px 0px 7px 2px rgba(0, 0, 0, .3);
-moz-box-shadow: inset 0px 0px 7px 2px rgba(0, 0, 0, .3);
box-shadow: inset 0px 0px 7px 2px rgba(0, 0, 0, .3);
}
.menu ul li:hover a{
background:#000000;
color:#FFFFFF;
text-decoration:none;
}
.menu li ul{
display:none;
height:auto;
padding:0px;
margin:0px;
border:0px;
position:absolute;
width:200px;
z-index:200;
}
.menu li:hover ul{
display:block;
}
.menu li li {
display:block;
float:none;
margin:0px;
padding:0px;
width:200px;
background:#FFFFFF;
/*this is where the rounded corners for the dropdown disappears*/
}
.menu li:hover li a{
background:none;
}
.menu li ul a{
display:block;
height:50px;
font-size:12px;
font-style:normal;
margin:0px;
padding:0px 10px 0px 15px;
text-align:left;
}
.menu li ul a:hover, .menu li ul li:hover a{
border:0px;
color:#ffffff;
text-decoration:none;
background:#000000;
-webkit-box-shadow: inset 0px 0px 7px 2px rgba(0, 0, 0, .3);
-moz-box-shadow: inset 0px 0px 7px 2px rgba(0, 0, 0, .3);
box-shadow: inset 0px 0px 7px 2px rgba(0, 0, 0, .3);
}
HTML:
<div class="image">
<img src="/Resources/img/Header.png" width=100% style={margin:0;padding:0;}/></img>
</div>
<div class="menu">
<ul>
<li><a href="#" >Home</a></li>
<li>
About
<ul>
<li>Company Info</li>
</ul>
</div>
I for some reason can't figure out how to solve this.
Edited:
Change the following line
.menu ul li:hover a
with this line;
.menu ul li:hover > a
It is more specific now.
SEE DEMO
I made some changes to your html (it was broken, and some elements where redundant), and your css (removed some selectors and rewrote others).
Is this something like what you were going for?
add color:#000 on .menu li:hover li a:
.menu li:hover li a{
background:none;
color:#000;
}