Links Moving Left on Hover - CSS - css

When I hover on the links inside the menu they are moving some pixels to the right.
The image below shows whats is happening:
HTML:
<ul id="menu">
<li>4 columns<!-- Begin 4 columns Item -->
<div class="dropdown_4columns"><!-- Begin 4 columns container -->
<div class="col_4">
<h3>This is a heading title</h3>
</div>
<div class="col_1">
<ul>
<li>ThemeForest</li>
<li>GraphicRiver</li>
<li>ActiveDen</li>
<li>VideoHive</li>
<li>3DOcean</li>
</ul>
</div>
<div class="col_1">
<ul>
<li>NetTuts</li>
<li>VectorTuts</li>
<li>PsdTuts</li>
<li>PhotoTuts</li>
<li>ActiveTuts</li>
</ul>
</div>
<div class="col_1">
<ul>
<li>FreelanceSwitch</li>
<li>Creattica</li>
<li>WorkAwesome</li>
<li>Mac Apps</li>
<li>Web Apps</li>
</ul>
</div>
<div class="col_1">
<ul>
<li>Design</li>
<li>Logo</li>
<li>Flash</li>
<li>Illustration</li>
<li>More...</li>
</ul>
</div>
<div class="col_4">
<h2>This is a heading title</h2>
</div>
<div class="col_1">
<ul>
<li>ThemeForest</li>
<li>GraphicRiver</li>
<li>ActiveDen</li>
<li>VideoHive</li>
<li>3DOcean</li>
</ul>
</div>
<div class="col_1">
<ul>
<li>NetTuts</li>
<li>VectorTuts</li>
<li>PsdTuts</li>
<li>PhotoTuts</li>
<li>ActiveTuts</li>
</ul>
</div>
<div class="col_1">
<ul>
<li>FreelanceSwitch</li>
<li>Creattica</li>
<li>WorkAwesome</li>
<li>Mac Apps</li>
<li>Web Apps</li>
</ul>
</div>
<div class="col_1">
<ul>
<li>Design</li>
<li>Logo</li>
<li>Flash</li>
<li>Illustration</li>
<li>More...</li>
</ul>
</div>
</div><!-- End 4 columns container -->
</li><!-- End 4 columns Item -->
CSS:
/* Navigation Bar */
#menu {
list-style:none;
width:940px;
/* width:100%; */
margin:30px auto 0px auto;
height:43px;
padding:0px 20px 0px 20px;
/* Rounded Corners */
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
/* Background color and gradients */
background: #c92424;
background: -moz-linear-gradient(top, #dd4343, #9e1c1c);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#dd4343), to(#9e1c1c));
/* Borders
border: 1px solid #002232;
-moz-box-shadow:inset 0px 0px 1px #edf9ff;
-webkit-box-shadow:inset 0px 0px 1px #edf9ff;
box-shadow:inset 0px 0px 1px #edf9ff; */
}
#menu li {
float:left;
text-align:center;
position:relative;
padding: 4px 10px 4px 10px;
margin-right:20px;
margin-top:7px;
border:none;
}
#menu li:hover {
height:21px;
margin-top:1px;
text-align:center;
padding: 11px 9px 11px 9px;
/* Background color and gradients */
background: white;
/* background: -moz-linear-gradient(top, #e56e6e, #e56e6e);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#e56e6e), to(#e56e6e)); */
}
#menu li a {
font-family:Arial, Verdana, sans-serif;
font-weight: bold;
font-size:14px;
line-height:21px;
color: #EEEEEE;
display:block;
outline:0;
text-decoration:none;
text-shadow: 1px 1px 1px #000;
}
#menu li:hover a {
color:#161616;
text-shadow: 1px 1px 1px #FFFFFF;
}
#menu li .drop {
padding-right:21px;
}
/* Drop Down */
.dropdown_2columns,
.dropdown_4columns {
margin:11px auto;
float:left;
position:absolute;
left:-999em; /* Hides the drop down */
text-align:left;
padding:10px 5px 10px 5px;
border:1px solid #c92424;
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_2columns {width: 280px;}
.dropdown_4columns {width: 560px;}
#menu li:hover .dropdown_2columns,
#menu li:hover .dropdown_4columns{
left:-1px;
top:auto;
}
/* Columns */
.col_1,
.col_2,
.col_4{
display:inline;
float: left;
position: relative;
margin-left: 5px;
margin-right: 5px;
}
.col_1 {width:130px;}
.col_2 {width:270px;}
.col_4 {width:550px;}
/* Drop Down Content Stylings */
#menu p, #menu h2, #menu h3, #menu ul li {
font-family:Arial, Verdana, sans-serif;
font-weight: bold;
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 a {
font-size:12px;
color:#015b86;
}
#menu li:hover div a:hover {
color:#029feb;
}
#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 #ffffff;
padding:0;
margin:0;
float:none;
text-align:left;
width:130px;
}
#menu li ul li:hover {
background:none;
border:none;
padding:0;
margin:0;
}
I tried to chance the padding and the margin at #menu li ul li:hover without any success. Does anyone have an idea of what is happening?

You have to remove the text-align:center; from #menu li:hover.
Here is the jsfiddle.

You probelm is text-align:center in #menu li:hover. A quick fix is to change it to the child selector instead of the descendatnt selector:
#menu>li:hover
Demo

Related

How to create drop menu from every li?

I have a problem with dropmenu. I created dropmenu from li:YOU and I want to create dropmenu from li: VIEW and HELP, but every dropmenu is below YOU. I don't know what I should to do that every dropmenu was below YOU, VIEW and HELP. I tried many ways but everything failed. And I have ask, I want to pubblish my question but show information that I have to add more detail.
*{
margin:0;
padding:0;
box-sizing:border-box;
}
body {
text-align: center;
background: #e0e0e0;
padding-bottom: 200px;
}
nav{
height:100px;
display:flex;
font-size:15px;
align-items:center;
justify-content:center;
text-transform:uppercase;
background-color:blue;
width:100%;
position:relative;
}
nav ul{
display:flex;
}
nav ul li{
list-style:none;
}
nav ul li a{
text-decoration:none;
color:black;
position:relative;
letter-spacing:2px;
padding:20px 20px;
margin:20px 0;
font-weight:bold;
background-color:green;
}
.dropOut .triangle{
width:0;
height:0;
position:absolute;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-bottom: 8px solid red;
top: -8px;
left: 50%;
margin-left: -8px;
}
.dropdownContain{
width:160px;
position:absolute;
margin-top:20px;
left:50%;
margin-left: -80px;
}
.dropOut{
width:160px;
background-color:yellow;
position:relative;
opacity:0;
}
.dropOut ul {
text-align:center;
padding: 10px 0;
display:block;
}
.dropOut ul li {
text-align: center;
width:160px;
padding: 12px 0 10px 0;
margin: 0px ;
color: red;
}
.dropOut ul li:hover {
background: #0D74FB;
}
nav ul li a:hover{
color:white;
}
ul li:hover a { color: white; }
ul li:hover .dropdownContain { top: 65px; }
ul li:hover .underline { border-bottom-color: #777; }
ul li:hover .dropOut { opacity: 1; margin-top: 8px; }
<nav>
<ul>
<li>View</li>
<li>You
<div class="dropdownContain">
<div class="dropOut">
<div class="triangle"></div>
<ul>
<li>Plan</li>
<li>Gallery</li>
<li>Contact</li>
<li>f1</li>
</ul>
</div>
</div>
</li>
<li>Help <div class="dropdownContain1">
<div class="dropOut">
<div class="tringle"></div>
<ul>
<li>Plan</li>
<li>Service</li>
<li>Contact</li>
<li>gallery</li>
</ul>
</div>
</div>
</li>
</ul>
</nav>

Text inside a menu item is not centered - CSS

The menu itens are not centered inside the space when it is hovered.
I tried to set text-align:center in the #menu li but it didn't work.
This image help to understand what is going on:
http://s2.postimg.org/r86nygkeh/CSS.png
<ul id="menu">
<li>Home<!-- Begin Home Item -->
</li><!-- End Home Item -->
<li>4 columns<!-- Begin 4 columns Item -->
<div class="dropdown_4columns"><!-- Begin 4 columns container -->
<div class="col_4">
<h3>This is a heading title</h3>
</div>
<div class="col_1">
<ul>
<li>ThemeForest</li>
<li>GraphicRiver</li>
<li>ActiveDen</li>
<li>VideoHive</li>
<li>3DOcean</li>
</ul>
</div>
<div class="col_1">
<ul>
<li>NetTuts</li>
<li>VectorTuts</li>
<li>PsdTuts</li>
<li>PhotoTuts</li>
<li>ActiveTuts</li>
</ul>
</div>
<div class="col_1">
<ul>
<li>FreelanceSwitch</li>
<li>Creattica</li>
<li>WorkAwesome</li>
<li>Mac Apps</li>
<li>Web Apps</li>
</ul>
</div>
<div class="col_1">
<ul>
<li>Design</li>
<li>Logo</li>
<li>Flash</li>
<li>Illustration</li>
<li>More...</li>
</ul>
</div>
<div class="col_4">
<h2>This is a heading title</h2>
</div>
<div class="col_1">
<ul>
<li>ThemeForest</li>
<li>GraphicRiver</li>
<li>ActiveDen</li>
<li>VideoHive</li>
<li>3DOcean</li>
</ul>
</div>
<div class="col_1">
<ul>
<li>NetTuts</li>
<li>VectorTuts</li>
<li>PsdTuts</li>
<li>PhotoTuts</li>
<li>ActiveTuts</li>
</ul>
</div>
<div class="col_1">
<ul>
<li>FreelanceSwitch</li>
<li>Creattica</li>
<li>WorkAwesome</li>
<li>Mac Apps</li>
<li>Web Apps</li>
</ul>
</div>
<div class="col_1">
<ul>
<li>Design</li>
<li>Logo</li>
<li>Flash</li>
<li>Illustration</li>
<li>More...</li>
</ul>
</div>
</div><!-- End 4 columns container -->
</li><!-- End 4 columns Item -->
</ul>
CSS
/* Navigation Bar */
#menu {
list-style:none;
width:882px;
/* width:100%; */
margin:30px auto 0px auto;
height:43px;
padding:0px 20px 0px 20px;
/* Rounded Corners */
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
/* Background color and gradients */
background: #c92424;
background: -moz-linear-gradient(top, #dd4343, #9e1c1c);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#dd4343), to(#9e1c1c));
/* Borders
border: 1px solid #002232;
-moz-box-shadow:inset 0px 0px 1px #edf9ff;
-webkit-box-shadow:inset 0px 0px 1px #edf9ff;
box-shadow:inset 0px 0px 1px #edf9ff; */
}
#menu li {
float:left;
text-align:center;
position:relative;
padding: 4px 0px 4px 0px;
margin-top:7px;
border:none;
width:110.25px;
}
#menu li:hover {
height:21px;
margin-top:1px;
padding: 11px 0px 11px 0px;
/* Background color and gradients */
background: white;
/* background: -moz-linear-gradient(top, #e56e6e, #e56e6e);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#e56e6e), to(#e56e6e)); */
}
#menu li a {
font-family:Arial, Verdana, sans-serif;
font-weight: bold;
font-size:14px;
line-height:21px;
color: #EEEEEE;
display:block;
outline:0;
text-decoration:none;
text-shadow: 1px 1px 1px #000;
}
#menu li:hover a {
color:#161616;
text-shadow: 1px 1px 1px #FFFFFF;
}
#menu li .drop {
padding-right:21px;
}
/* Drop Down */
.dropdown_2columns,
.dropdown_4columns {
margin:11px auto;
float:left;
position:absolute;
left:-999em; /* Hides the drop down */
text-align:left;
padding:10px 5px 10px 5px;
border:1px solid #c92424;
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_2columns {width: 280px;}
.dropdown_4columns {width: 560px;}
#menu li:hover .dropdown_2columns,
#menu li:hover .dropdown_4columns{
left:-1px;
top:auto;
}
/* Columns */
.col_1,
.col_2,
.col_4{
display:inline;
float: left;
position: relative;
margin-left: 5px;
margin-right: 5px;
}
.col_1 {width:130px;}
.col_2 {width:270px;}
.col_4 {width:550px;}
/* Drop Down Content Stylings */
#menu p, #menu h2, #menu h3, #menu ul li {
font-family:Arial, Verdana, sans-serif;
font-weight: bold;
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 a {
font-size:12px;
color:#015b86;
}
#menu li:hover div a:hover {
color:#029feb;
}
#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 #ffffff;
padding:0;
margin:0;
float:none;
text-align:left;
width:130px;
}
#menu li ul li:hover {
background:none;
border:none;
padding:0;
margin:0;
}
I think your padding-right is messing it up
#menu li .drop {
padding-right: 21px; //comment out this guy and try again
}
in chrome, you can right click on the nav, select inspect element, and chrome will hilight the element, the element's padding, and the elements margins in different colors so you can see why the layout is the way it is
hope that helps!
changed your #menu li a to
#menu li a:link, #menu li a:active {
font-family:Arial, Verdana, sans-serif;
font-weight: bold;
font-size:14px;
line-height:21px;
color: #EEEEEE;
display:inline;
text-decoration:none;
text-shadow: 1px 1px 1px #000;
padding:0;
margin:0;
}
It's because the actual text (IE "4 Columns") is wrapped in an <a> tag. Remove text-align:center; from both menu li and menu li:hover then add these two rules to menu li a
#menu li a {
width:110.25px;
text-align: center;
}
Those two rules in addition to the rules you already have of course.
Here is the DEMO

build a quicklink div with hover and image to have 4 on a row

I have been trying to get a div for quicklinks with a top image and hover on the urls.
It keeps messing up so the image floats over the div.
For example what im trying to achief see
Example
Maybe someone can point me in the right direction thank you :D
#snelmenu
{
padding:0;
margin:0;
list-style-type:none;
font-size:12px;
color:#717171;
}
#snelmenu li
{
border-bottom:1px solid #eeeeee;
}
#snelmenu li a:hover
{
color:White;
background-color:#219FD1;
}
#snelmenu a:link
{
color:#717171;
text-decoration:none;
display:block;
padding: 7px 10px;
}
#snelmenu a:hover
{
color:White;
}
.snelmenubox{
background: #ffffff;
border: 1px solid #ddd;
display: block;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow:0px 1px 1px 0px rgba(180, 180, 180, 0.2);
-moz-box-shadow:0px 1px 1px 0px rgba(180, 180, 180, 0.2);
box-shadow:0px 1px 1px 0px rgba(180, 180, 180, 0.2);
padding: 25px 25px 20px 25px;
}
.snelmenubox h1,
.snelmenubox h2,
.snelmenubox h3,
.snelmenubox h4,
.snelmenubox h5,
.snelmenubox h6,
.snelmenubox p{
margin:0 0 10px 0;
}
.snelmenubox .snelmenubox-img{
margin:-26px -26px 25px -26px;
-webkit-border-radius:5px 5px 0px 0px;
-moz-border-radius:5px 5px 0px 0px;
border-radius:5px 5px 0px 0px;
overflow: hidden;
}
.snelmenubox .snelmenubox-img img{
width:100%;
max-width:100%;
height:auto;
}
There is no need to float the image at all, just place it in the wrapping element (div or nav)
Codepen Example
HTML
<nav role='navigation'>
<div class="img-wrap">
<img src="http://lorempixel.com/150/150/" alt="" />
</div>
<h3>Title</h3>
<ul class="side-bar">
<li>Option 1</li>
<li class="parent">Option 2
<ul>
<li>Sub 1</li>
<li>Sub 2</li>
<li class="parent">Sub 3
<ul>
<li>Sub-Sub 1</li>
<li>Sub-Sub 2</li>
<li>Sub-Sub 3</li>
<li>Sub-Sub 4</li>
</ul>
</li>
<li>Sub 4</li>
</ul>
</li>
<li>Option 3</li>
<li>Option 4</li>
</ul>
</nav>
CSS
/* basics */
* {
margin:0;
padding:0;
box-sizing:border-box;
}
nav {
width:150px;
margin:10px auto;
}
nav .img-wrap {
border-radius:10px 10px 0 0;
overflow:hidden;
}
nav img {
display:block;
}
nav h3 {
color:orange;
padding:16px;
}
ul {
list-style:none;
}
ul, li {
padding:0;
}
li a {
text-decoration:none;
display:block;
color:white;
}
/* base styling */
li {
background:darkgreen;
position:relative;
padding:0.25em;
}
.parent:before {
content:"";
position:absolute;
width:0;
height:0;
border-width:10px;
border-style:solid;
border-color:transparent;
top:50%;
}
li:hover {
background:seagreen;
}
li > ul {
display:none;
position:absolute;
left:100%;
top:0;
width:100%;
}
li:hover > ul {
display:block;
}
.side-bar li > ul {
left:100%;
top:0;
width:100%;
}
.side-bar .parent:before {
border-left-color:white;
margin-top:-10px;
right:10px;
}
This is easily customisable, just change a few colors / sizes here and there.

Center align hidden divs within <li> tags for menu dropdown

I have a horizontal menu based on this that is pure CSS and HTML and am trying to center align the dropdown divs under each top level menu item but am having some difficulty getting it to work. It currently aligns to the right, and any changes I make when changing to "relative" positioning of the child elements correct alignment of the parent/child but then throw off the top level items because the children take up the space between items.
Below is the code for an item, followed by the associated CSS.
Html:
<ul id="menu">
<li>Home
<div class="dropdown_2columns">
<div class="col_1">
<p class="black_box">Download stuff here<br><img src="img/menu-button.png"></a></p>
</div>
<div class="col_1">
<ul>
<li><a href="#">Item 1</li>
<li><a href="#">Item 2</li>
<li><a href="#">Item 3</li>
</ul>
</div>
</div>
</li>
CSS
#menu {
text-align:center;
color: #2262a0;
list-style:none;
width:690px;
margin:30px auto 0px auto;
height:28px;
padding:0px 20px 10px 20px;
background: #fff;
}
#menu li {
float:left;
display:block;
text-align:center;
position:relative;
padding: 4px 10px 4px 10px;
margin-right:0px;
margin-top:7px;
border:none;
}
#menu li:hover {
padding: 4px 9px 4px 9px;*/
}
.dropdown_1column,
.dropdown_2columns,
.dropdown_3columns,
{
background:url("img/blue-arrow.png") no-repeat center 0px z-index;
margin:10px auto;
float:left;
display: inline-block;
position:absolute;
left:-999em; /* Hides the drop down */
text-align:center;
padding:10px 5px 10px 5px;
border-left:1px solid #e5edf4;
border-right:1px solid #e5edf4;
border-top:3px solid #004b91;
border-bottom:3px solid #e5edf4;
}
.dropdown_1column {width: 260px;}
.dropdown_2columns {width: 520px;}
.dropdown_3columns {width: 780px;}
#menu li:hover .dropdown_1column,
#menu li:hover .dropdown_2columns,
#menu li:hover .dropdown_3columns,
{
left:-1px;
top:auto;
}
.col_1,
.col_2,
.col_3,
{
display:inline;
float: left;
position: relative;
margin-left: 5px;
margin-right: 5px;
}
.col_1 {width:250px;}
.col_2 {width:500px;}
.col_3 {width:750px;}
Any CSS guru's out there care to send some advise?
In the example posted you can move the boxes by changing
#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: -212px; /*for column 4*/
}
Of course you would have to have a static width for each box and style them accordingly.

IE Problems with CSS3 Dropdown & Ads

A website I'm working on, www.flynntec.com, is having problems with IE8. I'm assuming it's happening in 6 and 7 as well. Firefox/Chrome both work fine.
I have two Ads in the CSS3 dropdown (Excel) that when IE mouses over the ads, the dropdown closes. IE8 can hover over EVERYTHING else in the dropdown, but as soon as it hits the ads, the dropdown closes immediately.
Any thoughts?
CODE ADDED
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="Microsoft Office Tutorials - Excel, Word, PowerPoint, Access" />
<title>Microsoft Office Tutorials - Excel, Word, PowerPoint, Access</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body {
background-image: url(media/background.jpg);
background-repeat: repeat-x;
}
</style>
</head>
<body>
<div align=center id="container">
<div id="banner"><img src="media/banner.jpg" width="800" height="120" alt="Microsoft Office Tutorials Banner" /></div>
<div id="content">
<ul id="menu">
<li>Home<!-- Begin Home Item -->
<div class="dropdown_2columns"><!-- Begin 2 columns container -->
<div class="col_2">
<h2>Microsoft Office Tutorials</h2>
</div>
<div class="col_2">
<p>This site is dedicated to training people to use Microsoft Excel, Word, PowerPoint and Access. Whether you're just beginning or a professional, there are resources here for you.</p>
<p>Our philosophy is different. We have created our own tutorials, but we've also leveraged the power of the internet to gather the world's best training tutorials on the Microsoft Office Suite.</p>
</div>
<div class="col_2">
<h2>Our Philosophy</h2>
</div>
<div class="col_1">
<img src="media/FreeMini.jpg" alt="Always Free" width="125" height="48" vspace="10" />
</div>
<div class="col_1">
<p>We are dedicated to providing you the best information. <b>Always Free </b></p>
</div>
</div><!-- End 2 columns container -->
</li><!-- End Home Item -->
<li>Excel<!-- Begin Excel Item -->
<div class="dropdown_5columns"><!-- Begin ExcelContainer -->
<div class="col_5">
<h2>Microsoft Excel</h2>
</div>
<div class="col_1"> <h3>Overview</h3>
<p class="black_box">Microsoft Excel is the world's most popular spreadsheet creation tool.</p>
</div>
<div class="col_1">
<ul class="greybox"><h3>Beginner</h3><li>Welcome to Excel</li>
<li>Calculations</li>
<li>Functions and Formulas</li>
<li>Formatting</li>
<li>Creating Charts</li>
<li>More...</li>
</div>
<div class="col_1">
<ul class="greybox"><h3>Intermediate</h3><li>Freezing Panes</li>
<li>The =IF Formula</li>
<li>Conditional Formatting</li>
<li>The Date in Excel</li>
<li>Drop-Down Lists</li>
<li>More...</li>
</div>
<div class="col_1">
<ul class="greybox"><h3>Advanced</h3><li>Using =VLOOKUP</li>
<li>Pivot Tables</li>
<li>Using the Goal Seek Feature</li>
<li>Templates</li>
<li>Macros</li>
<li>More...</li>
</ul>
</div>
<div class="col_1">
<ul class="greybox"><h3>Sponsor</h3><p><script type="text/javascript"><!--
google_ad_client = "ca-pub-1357665793080808";
/* Support */
google_ad_slot = "8875829615";
google_ad_width = 120;
google_ad_height = 240;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script> </p>
</div>
<div class="col_1">
<p></p>
</div>
<div class="col_5">
<h2>Additional Free Resources</h2>
</div>
<div class="col_3">
<img src="media/youtube-logo.jpg" alt="YouTube Picture" name="youtube" width="90" height="70" class="img_left imgshadow" id="youtube" />
<p>If you prefer to learn visually, YouTube is the best free source for Excel tutorials in the world. We have compiled the best, most popular Excel tutorials from YouTube and put them here for your convenience. </p>
<br />
<img src="media/microsoft-logo__111129012732.jpg" alt="" name="microsoft" width="90" height="24" class="img_left imgshadow" id="microsoft" />
<p>Microsoft has some of the best tutorials in the world listed on their website. Microsoft Training can be found here.</p>
<br />
</div>
<div class="col_5">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-1357665793080808";
/* Excel CSS3 Dropdown */
google_ad_slot = "0975939945";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</div><!-- End Excel container -->
</li><!-- End Excel Item -->
CSS
#charset "utf-8";
/* CSS Document */
#container {
}
#banner img{
border:7px solid #FFF;
border-radius: 7px;
-moz-border-radius: 7px
-webkit-border-radius: 7px;
}
#banner {
padding-bottom: 0px;
}
#content {
}
#footer {
}
#menu {
list-style: none;
width: 774px;
margin:30px auto 0px auto;
height:43px;
padding:0px 20px 0px 20px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
background: #003910;
background: -moz-linear-gradient(top, #FFF, #003910);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#003910));
-moz-box-shadow:inset 0px 0px 1px #edf9ff;
-webkit-box-shadow:inset 0px 0px 1px #edf9ff;
box-shadow:inset 0px 0px 1px #edf9ff;
border: 1px solid #FFF;
}
#menu li {
float:left;
display:block;
text-align:center;
position:relative;
padding: 4px 10px 4px 10px;
margin-right:30px;
margin-top:7px;
border:none;
}
#menu li:hover {
background: #F4F4F4;
background: -moz-linear-gradient(top, #F4F4F4, #EEEEEE);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#F4F4F4), to(#EEEEEE));
border: 1px solid #777777;
padding: 4px 9px 4px 9px;
-moz-border-radius: 5px 5px 0px 0px;
-webkit-border-radius: 5px 5px 0px 0px;
border-radius: 5px 5px 0px 0px;
}
#menu li a {
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
color: #EEEEEE;
display:block;
outline:0;
text-decoration:none;
text-shadow: 1px 1px 1px #000;
}
#menu li:hover a {
color: #161616;
text-shadow: 1px 1px 1px #FFFFFF;
}
#menu li .drop {
padding-right: 21px;
background: url(media/drop.png);
background-repeat: no-repeat;
background-position: right 8px;
}
#menu li:hover .drop {
background: url(media/drop.png);
background-repeat: no-repeat;
background-position: right 7px;
}
.dropdown_1column,
.dropdown_2columns,
.dropdown_3columns,
.dropdown_4columns,
.dropdown_5columns {
margin:4px auto;
position:absolute;
left:-999em; /* Hides the drop down */
text-align:left;
padding:10px 5px 10px 5px;
border:1px solid #777777;
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;
}
#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:-1px;top:auto;
}
.dropdown_1column {width: 146px;}
.dropdown_2columns {width: 284px;}
.dropdown_3columns {width: 422px;}
.dropdown_4columns {width: 560px;}
.dropdown_5columns {width: 740px;}
.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;}
#menu .menu_right {
float:rightright;
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;
}
#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;
}
.strong {
font-weight:bold;
}
.italic {
font-style:italic;
}
#menu li:hover div a {
font-size:12px;
color:#015b86;
}
#menu li:hover div a:hover {
color:#029feb;
}
#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 #ffffff;
padding:0;
margin:0;
float:none;
text-align:left;
width:130px;
}
#menu li ul li:hover {
background:none;
border:none;
padding:0;
margin:0;
}
.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 {
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 .greybox li {
background:#F4F4F4;
border:1px solid #bbbbbb;
margin:0px 0px 4px 0px;
padding:4px 6px 4px 6px;
width:116px;
/* 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;
}
<!--[if IE 6]>
<style>
body {behavior: url("csshover3.htc");}
</style>
<![endif]-->
Thanks!
This issue is caused by a particular wmode setting on the Flash object. For what you're after, you need the wmode to be opaque, and not window, direct, gpu or the default. However, since you are using Google ads you have absolutely no control over the content (you can't even use JavaScript to change it because of cross-domain issues). This is probably deliberate on Google's part, to prevent users from hiding ads by covering them up with another element, but frustrating when trying to have anything legitimiately on top of it.
The best suggestion I can come up with is to have the container for the ad change its visibility style to hidden while the menu is shown, then change it back to visible afterward. It'll look messy, but at least it won't be handled on top of your actual content.

Resources