Results 1 to 2 of 2

Thread: css dropdown not displaying properly in IE

  1. #1
    Join Date
    Jul 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default css dropdown not displaying properly in IE

    hi all --

    i'm styling a dropdown menu in CSS and everything looks great, except for the fact that the submenu (part of #topnav) drops behind the rest of the site's content (such as div.moduleMid). This problem only happens in Internet Explorer. (So you can only see it for a few lines until it drops behind another div)

    somebody told me this may have to do with z-indexing, but i'm not very familiar with using the z-index property. i did some research into z-index and tried applying it in several ways, but to no avail.

    here's is what the code looks like:

    Code:
    @charset "UTF-8";
    
    @font-face {
    font-family: "TNC";
    src: url("http://www.lukeelmers.com/tnc/RNS-B__2.TTF");
    }
    
    body {
    	margin: 0;
    	background-image:url(http://lukeelmers.com/images/bg.gif);
    	background-color:#ffffff;
    	background-attachment: scroll;
    	background-position:top center;
    	background-repeat:no-repeat;
    	margin-top: -40px;
    	font-family:arial;
    	font-size:12px;
    	font-weight:normal;
    	text-transform:lowercase;
    	text-decoration:none;
    	}
    div.wrap {
    	width:960px;
    	background-color:transparent;
    	}
    div#searchbar {
    	background-color: transparent;
    	visibility: hidden;
    	}
    div#topnav {
    	background-image: url(http://i28.photobucket.com/albums/c219/ospazzo/header_bg960.png);
    	background-color: transparent;
    	background-repeat: no-repeat;
    	background-attachment: scroll;
    	height:90px;
    	}
    div#header {
    	position: relative;
    	background-color: transparent;
    	}
    div#header div div {
    	background-color: transparent;
    	margin-top: -90px;
    	}
    #topnav {
    	background-color:#444444;
    	}
    #topnav ul {
    	border-right:0;
    	}
    #topnav ul li {
    	border-left:0;
    	}
    #topnav ul li a {
    	color:#ffffff;
    	font-size: 13px;
    	font-weight: bold;
    	}
    #topnav ul li a:hover {
    	background-color:#444444;
    	color:#444444;
    	text-decoration:none;
    	}
    #topnav ul.subMenu a:link {
    	color: #444444;
    	}
    #topnav li.dropDown:hover ul.subMenu a:hover,#topnav li.hover ul.subMenu a:hover, #topnav ul.subMenu a {
    	background: #ffffff;
    	color: #444444;
    	}
    #topnav ul li.dropDown:hover a,#topnav ul li a:hover {
    	background: #444444;
    	color: #ffffff;
    	}
    #topnav ul.subMenu, #topnav ul li.hover a,#topnav ul li.hover a:hover {
    	background-color: #444444;
    	}
    #topnav ul, #topnav ul li {
    	border: none;
    	}
    #topnav ul li.dropDown:hover a,
    #topnav ul li.hover a, #topnav ul a:hover, #topnav ul li.hover a:hover {
    	color: #ffffff;
    	}
    #topnav ul.subMenu {
    	border: 0;
    	}
    #topnav li.dropDown:hover ul.subMenu a:hover,
    #topnav li.hover ul.subMenu a:hover {
    	color: #444444;
    	}
    #topnav ul li a small, #topnav ul li a small {
    	color: #ffffff;
    	font-size: 10px;
    	}
    #topnav ul li a:hover small, #topnav ul li a.hover small {
    	color: #ffffff;
    	font-size: 10px;
    	}
    ul.contactLinks {
    	float: right;
    	padding-right: 5px;
    	text-align: right;
    	width: 42%;
    	overflow-x: hidden;
    	overflow-y: hidden;
    	white-space: nowrap;
    	position: absolute;
    	left: 520px;
    	top: 38px;
    	}
    div.moduleMid {
    	background-color:#ffffff;
    	outline: dashed;
    	outline-color:#999999;
    	padding: 10px;
    	}
    div[id~=footer] a {
    	font-family:arial;
    	font-size:10px;
    	font-weight:normal;
    	text-decoration:none;
    	text-transform:lowercase;
    	}
    div[id~=footer] div {
    	padding:10px 0;
    	}
    div.moduleBody a {
    	font-size:12px;
    	letter-spacing:0px;
    	text-decoration:none;
    	text-transform:lowercase;
    	font-weight:bold;
    	}
    div.basicDetails h2 {
    	font-family: "TNC", Arial Rounded MT Bold, Arial Black, Arial;
    	color:#FF0000;
    	font-size:42px;
    	letter-spacing:-1px;
    	text-transform: uppercase;
    	font-weight:bold;
    	}
    h2 {
    	font-family:arial;
    	font-size:10px;
    	background-color:transparent;
    	text-transform:uppercase;
    	font-weight:bold;
    	}
    h3.moduleHead {
    	font-family: "TNC", Arial Rounded MT Bold, Arial Black, Arial;
    	font-weight:bold;
    	color:#444444;
    	font-size:22px;
    	text-transform:uppercase;
    	background:#cccccc;
    	}
    h4 {
    	font-family:arial;
    	font-size:12px;
    	text-transform:uppercase;
    	font-weight:bold;
    	padding-left:0px;
    	}
    strong {
    	font-family:arial;
    	font-size:10px;
    	text-transform:uppercase;
    	font-weight:bold;
    	padding-left:0px;
    	padding-right:0px;
    	}
    a:link, a:active, a:visited {
    	color:#000000;
    	font-size: 12px;
    	font-weight: bold;
    	}
    a:hover, div[id~=footer] a:hover, div.moduleBody a:hover {
    	color:#000000;
    	}
    i'm also trying to figure out how to use CSS to embed fonts (my current treatment only works in safari), but that's just a minor detail.

    any help would be GREATLY appreciated.

    take care,

    luke
    Last edited by ospazzo; 07-10-2009 at 06:00 PM. Reason: issue resolved!

  2. #2
    Join Date
    Jul 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    never mind -- i figured out the issue! i used z-index to modify the following items:

    Code:
    #topnav ul.subMenu {
    	border: 0;
    	position: absolute;
    	z-index: 500;
    	}
    div.moduleMid {
    	background-color:#ffffff;
    	outline: dashed;
    	outline-color:#999999;
    	padding: 10px;
    	position: relative;
    	z-index: 100;
    	}
    this seemed to do the trick!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •