html - CSS code works in firefox and IE but not in chrome -
i have website in have menu. css menu works fine on mozilla firefox , ie not work in chrome. in chrome sub menu underneath photo in ff , ie above(as should be). @ same time submenu bit above it's position in ff , ie. here code:
@charset "utf-8"; /* css document */ body { background-color: #000; background-image: url(pictures/plundergem-title.png); background-repeat: no-repeat; background-position: 50% 0%; height: 1500px; } .menu-list { list-style-type: none; color: #e92a27; font-family: "mayan font"; font-size: 36px; } .menu-list li { cursor: pointer; } .menu-list li a:hover { background-color: #e92a27; color: #000; } .menu-list li ul li a:hover { background-color: #e92a27; color: #000; } .menu-list li ul li { color: #e92a27; text-decoration: none; } .menu-list li { text-decoration: none; color: #e92a27; } @font-face{ src:url(cfcivilisationmaya-regular.woff); font-family:"mayan font"; } .menu-block { width: 200px; position: fixed; top: 200px; left: -23px; border-right: 3px solid #e92a27; } #menu-seperation { width: 150px; position: fixed; left: 20px; top: 270px; } #flash-container { position: relative; height: 500px; width: 700px; left: 300px; top: 700px; color: #fff; font-family: "text font"; font-size: 18px; z-index: 1000; } #flash-container p { color: #fff; font-family: "text font"; } @font-face{ font-family:"text font"; src:url(cataneobt-regular.woff); } .scenemenu { list-style-type:none; color:#e92a27; font-family:"mayan font"; position:fixed; top:297px; left:189px; z-index:2000; width:150px; display:none; } .scenemenu li { position:relative; left:-50px; z-index:2000; } #scenebutton:hover ul.scenemenu { display:inline; } .scenemenu:hover { display:inline; } #pic1 { z-index:1000; } a:visited { color:#e92a27; }
<!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" /> <link href="stylesheet.css" rel="stylesheet" type="text/css" /> <script src="jquery-2.1.1.min.js"></script> <script src="jquery-scrollto.js"></script> <script src="animation.js"></script> <link rel="shortcut icon" href="pictures/gem icon.png" /> <title>plundergem adventure game</title> </head> <body> <div class="menu-block"> <ul class="menu-list"> <li><a href="index.php">home</a> </li> <hr id="menu-seperation" /> <br style="line-height: .3em" /> <li id="scenebutton">scenes <ul class="scenemenu"> <li><a href="enter temple 2nd scene/index.php">scene 2</a> </li> <li><a href="go downstairs 3rd scene/index.php">scene 3</a> </li> </ul> </li> </ul> </div> <div id="flash-container"> <img src="pictures/scene_1_converted.jpg" width="700" height="504" id="pic1" /> <p>the sky dark, grass dark, , dark quite dark. perfect job of setting mood. unfortunately, raining, meaning unable pull off uncanny batman impressions. climb temple stairs, or head home?</p> <br /> <a href="enter temple 2nd scene/index.php"><u>1. climb temple stairs in on manly fashion.</u></a> <br /> <br /> <a><u>2. run away , never come back.</u></a> </div> </body> </html>
screen shot - left firefox right chrome
i have prepared jsfiddle: http://jsfiddle.net/nd2jy6qg/
.menu-block { width: 200px; position: fixed; top: 200px; left: -23px; border-right: 3px solid #e92a27; z-index:10001; }
the problem z-index in menu-block; must @ least 1001 since flash-container has 1000;
Comments
Post a Comment