I am having challenges with my spry menu displaying behind flash objects in IE8. It works fine in FF.

I have looked at the z-index's and they appear correct.

It also displays correctly over everything else. It is just the flash objects where there is an issue.

http://www.business.artizencreations.com

Thank you.

Recommended Answers

All 6 Replies

Nobody will be able to help you solve this problem without you posting us your code, as the link to your site requires a login, and does not display the problem that you are stating in your post.

Spry CSS:

@charset "UTF-8";

/* SpryMenuBarHorizontal.css - version 0.6 - Spry Pre-Release 1.6.1 */

/* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */

/*******************************************************************************

 LAYOUT INFORMATION: describes box model, positioning, z-order

 *******************************************************************************/

/* The outermost container of the Menu Bar, an auto width box with no margin or padding */
ul.MenuBarHorizontal
{
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 100%;
    cursor: default;
    width: auto;
    height: auto;
}
/* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: [url]http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html[/url] */
ul.MenuBarActive
{
    z-index: 1000;
}
/* Menu item containers, position children relative to this container and are a fixed width */
ul.MenuBarHorizontal li
{
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 100%;
    position: relative;
    text-align: left;
    cursor: pointer;
    width: 120px;
    height: auto;
    float: left;
}
/* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
ul.MenuBarHorizontal ul
{
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 100%;
    z-index: 1020;
    cursor: default;
    width: 120px;
    position: absolute;
    left: -1000em;
}
/* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
{
    left: auto;
}
/* Menu item containers are same fixed width as parent */
ul.MenuBarHorizontal ul li
{
    width: 120px;
    height: auto;
}
/* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
ul.MenuBarHorizontal ul ul
{
    position: absolute;
    margin: -5% 0 0 95%;
}
/* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
{
    left: auto;
    top: 0;
}

/*******************************************************************************

 DESIGN INFORMATION: describes color scheme, borders, fonts

 *******************************************************************************/

/* Submenu containers have borders on all sides */
ul.MenuBarHorizontal ul
{
    border: 0px solid #CCC;
}
/* Menu items are a light gray block with padding and no text decoration */
ul.MenuBarHorizontal a
{
    display: block;
    cursor: pointer;
    background-image: url(MenuBackgroundGray6%20copy.jpg);
    background-color: #EEE;
    padding: 0.5em 0.75em;
    color: #000000;
    text-decoration: none;
}
/* Menu items that have mouse over or focus have a blue background and white text */
ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
{
    background-color: #33C;
    color: #333333;
}
/* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
{
    background-color: #33C;
    color: #333333;
}

/*******************************************************************************

 SUBMENU INDICATION: styles if there is a submenu under a given menu item

 *******************************************************************************/

/* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal a.MenuBarItemSubmenu
{
    background-image: url(MenuBackgroundGray6%20copy.jpg);
    background-repeat: no-repeat;
    background-position: 95% 50%;
}
/* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
{
    background-image: url(MenuBackgroundGray6%20copy.jpg);
    background-repeat: no-repeat;
    background-position: 95% 50%;
}
/* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
{
    background-image: url(MenuBackgroundGray6%20copy.jpg);
    background-repeat: no-repeat;
    background-position: 95% 50%;
}
/* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
{
    background-image: url(MenuBackgroundGray6%20copy.jpg);
    background-repeat: no-repeat;
    background-position: 95% 50%;
}

/*******************************************************************************

 BROWSER HACKS: the hacks below should not be changed unless you are an expert

 *******************************************************************************/

/* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
ul.MenuBarHorizontal iframe
{
    position: absolute;
    z-index: 1010;
    filter:alpha(opacity:0.1);
}
/* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
@media screen, projection
{
    ul.MenuBarHorizontal li.MenuBarItemIE
    {
        display: inline;
        f\loat: left;
        background: #FFF;
    }
}

Main CSS:

@charset "utf-8";
/* CSS Document */

body,td,th {
    font-family: Times New Roman, Times, serif;
    font-size: 16px;
    color: #FFFFFF;
}
body {
    background-color: #333333;
}
a:link {
    color: #CCCCCC;
}
a:visited {
    color: #FF9900;
}

.LargeColor {
    background-color:#333333
}
.style1 {
    color: #990000
}
h1 {
    display: none;
    font-size: 10px;
}

.Container {
    margin: auto;
    padding: 0px;
    width: 800px;
    position: relative;
    visibility: visible;
    height: auto;
}
.MainContainer {
    padding: 0px;
    width: 800px;
    position: relative;
    height: auto;
    float: left;
    margin-top: 40px;
    margin-right: auto;
    margin-bottom: auto;
    margin-left: auto;
}
.ContentContainer {
    padding: 0px;
    width: 800px;
    position: relative;
    height: auto;
    float: left;
    background-image: url(LayoutImages/images/BackgroundGray3_03.jpg);
}
.Content2 {
    padding: 0px;
    width: 800px;
    position: relative;
    height: auto;
    float: left;
    margin-top: 20px;
    margin-right: auto;
    margin-bottom: auto;
    margin-left: auto;
    z-index: 800;
}
.Content3 {
    padding: 0px;
    width: 800px;
    position: relative;
    height: auto;
    float: left;
    margin-top: 0px;
    margin-right: auto;
    margin-bottom: 20px;
    margin-left: auto;
}
.HeaderLeft {
    padding: 0px;
    width: 40px;
    position: relative;
    height: 36px;
    float: left;
    margin-top: 20px;
    margin-right: auto;
    margin-bottom: auto;
    margin-left: auto;
}
.HeaderMenu {
    padding: 0px;
    width: 720px;
    position: relative;
    height: 36px;
    float: left;
    margin-top: 20px;
    margin-right: auto;
    margin-bottom: auto;
    margin-left: auto;
    z-index: 990;
}
.BodyLeft {
    padding: 0px;
    width: 40px;
    position: relative;
    height: 36px;
    float: left;
}
.BodyLeft1 {
    padding: 0px;
    width: 260px;
    position: relative;
    height: auto;
    float: left;
}
.BodyCenter {
    padding: 10px;
    width: 414px;
    position: relative;
    height: auto;
    border: ridge;
    border-width: 2px;
    border-color: #990000;
    float: left;
    margin-top: auto;
    margin-right: auto;
    margin-bottom: 0px;
    margin-left: 20px;
    z-index: 900;
}

Document code pulled from FF

<!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" />
<title>Untitled Document</title>
<link href="main.css" rel="stylesheet" type="text/css" />
<link href="favicon.ico" REL="SHORTCUT ICON" />
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
    background-image: url(LayoutImages/images/MainBackground2%20copy.png);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;

}
h1 {
    font-size: 10px;
}
a:link {
    color: #FFFFFF;
    text-decoration: none;
}
a:visited {
    text-decoration: none;
    color: #990000;
}
a:hover {
    text-decoration: underline;
}
a:active {
    text-decoration: none;
}
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>

<body>
<div class="Container">
  <div class="MainContainer">
    <div class="ContentContainer">
      <div class="HeaderLeft"></div>
        <div class="HeaderMenu">
            <ul id="MenuBar1" class="MenuBarHorizontal">
              <li><a class="MenuBarItemSubmenu" href="#">The Portrait</a>
                  <ul>

                  <li><a href="portrait.html">Portfolio</a></li>
                  <li><a href="portraitpricing.html">Pricing</a></li>
                  </ul>
              </li>
              <li><a href="#" class="MenuBarItemSubmenu">Headshots</a>
                <ul>
                    <li><a href="headshotbus.html">Business</a></li>

                    <li><a href="headshotent.html">Entertainers</a></li>
                  <li><a href="headshotpricing.html">Pricing</a></li>
                </ul>
              </li>
              <li><a class="MenuBarItemSubmenu" href="#">Families</a>
                  <ul>
                    <li><a href="families.html">Portfolio</a></li>

                    <li><a href="familiespricing.html">Pricing</a></li>
                  </ul>
              </li>
              <li><a href="#" class="MenuBarItemSubmenu">HS Seniors</a>
                <ul>
                    <li><a href="hsseniors.html">Portfolio</a></li>
                  <li><a href="hsseniorspricing.html">Pricing</a></li>

                </ul>  
              </li>
              <li><a href="http://www.artizencreations.zenfolio.com/" target="_blank">Client Galleries</a></li>
              <li><a href="contact.html">Contact</a></li>
            </ul>
      </div>
      <div class="Content2">
        <div class="BodyLeft"></div>

        <div class="BodyLeft1"> 
          <div align="left"><a href="index.html"><img src="LayoutImages/images/ArtizenCreationsNewsletter2010.png" alt="Artizen Creations" width="260" height="110" border="0" /></a><br />
            <br />
          High School Seniors</div>
        </div>
        <div class="BodyCenter">
          <script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','414','height','618','title','High School Seniors','src','FlashFiles/HSseniors1','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','FlashFiles/HSseniors1' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="414" height="618" title="High School Seniors">
            <param name="movie" value="FlashFiles/HSseniors1.swf" />
            <param name="quality" value="high" />
            <embed src="FlashFiles/HSseniors1.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="414" height="618"></embed>
          </object>
        </noscript></div>
      </div>

      <div class="Content2">
         <div align="center">
           | <a href="index.html">Home</a>
           | <a href="aboutus.html">About Us</a>
           | <a href="contact.html">Contact Us</a>
           | <a href="privacypolicy.html">Privacy Policy</a> |
         </div>

       </div>
       <div class="Content3">
         <div align="center">
            &copy; Artizen Creations 2011 all rights reserved.
         </div>
       </div>

</div>
</div>
</div>
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
//-->

</script>
</body>
</html>

No problem. Your menu displays correctly in my IE7, FF and Chrome. It seems that many people have similar problems, with different solutions to it. What I suggest, is for you to follow the link I'm posting here, and see if one of those solutions will also solve your problem. If not, we can look further into your code.

Please post any results back here, and keep us informed. Follow yhis link:

http://www.daniweb.com/forums/search13844573.html

Challenge solved.

Because the flash content is active it is always on top regardless of the z-index. The following from Adobe explains how to fix this.

After some trial and error with the attached page. It appears that there is a proper coding order in the embed tag.

http://kb2.adobe.com/cps/142/tn_14201.html

New Code
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="414" height="618">
<param name="movie" value="FlashFiles/Family1.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<embed src="FlashFiles/Family1.swf" width="414" height="618" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="transparent"></embed>
</object>

Cool, glad you got the solution. Please see the solved button below, and mark this as solved, so that future posters can use your solution as well.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.