CSS - Css Balloon Pops Under Image (z-index?)
I have multiple document icons (images) on my page placed using absolute positioning <div> over a large background image. On hover over those document images a text box pops up with more information and links. However, if my text box overlaps with other document icon on the page, the icon obscures the link or text in the pop up balloon. I tried to use z-index, but that didn't work..
I would be grateful if someone could suggest a fix and or web page with info that could help me. best, Mitchell A Similar TutorialsHi, I'm new to this forum I hope someone can help. I'm using a jquery slidemenu to make menus pop down from a ul but I'm having trouble in that when the menu opens up, it opens behind a div below. Any tips much appreciated Thanks **sorted myself found a position relative on some bit being underlapped This is the look I am trying to achieve, the cocktail glass and green need a drop shadow. This is my 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=iso-8859-1" /> <title>Untitled Document</title> <link href="css/main.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="wrapper"> <div id="logo"></div> <div id="headerbar"></div> <div id="masthead"></div> <p>this is a test</p> </body> </html> This is my .css: /* CSS Document */ body { background-image:url(../images/background.jpg); font-family: Arial, Helvetica, sans-serif; font-size: 76%; } p { font-size: 1.0em;line-height: 120%;color:#333333; margin-right:1em; } div#wrapper { width: 682px; margin: auto; background:#fff; border-color:#333; border: solid; border-width:1px;} #headerbar { position:relative; top:15px; left:7px; width: 668px; height: 46px; background: url(../images/headerbar.jpg) no-repeat; z-index:1;} #masthead { position:relative; top:15px; width: 668px; height: 204px; margin:auto; margin-top:5px; background: url(../images/masthead.jpg) no-repeat ;z-index:1;} #logo { position:relative; top:0px; left:0px; background-image: url(../images/glassandgreen.jpg) no-repeat; z-index:2;} #contentwrapper{ width: 668px; margin: auto; padding:.7em 0 .7em 0; background:#fff; border-color:#333333; border: solid; border-width:1px; } hi, Ive got a mixture of CSS and tables (not ideal i know) the problem is the image to the top right. ive added the image within the container and then the rest of the site content is within a table just below the container line within the index page. How do i get the image over the tabled data? URL: http://www.primaryictsupport.co.uk/clients/swinnow/ Thanks for any help... Mike k so I have a weird problem. My site snafu-comics.com basically has a main table with all the content in it and then two images on the left and right side just for added visual effect when browser windows are larger resolution than 955 pixels. But the problem is how it's setup now the left image loads (pushing everything to the right side of the screen since it touches the main middle table on the right) Then the main table loads and it takes a little while to finish loading mostly due to the ads. Then the right image loads and once it loads the whole thing pops to the center of the screen like it should. What I'm trying to do is just get the center table in the center the whole time. And then when the rest loads it loads. Any ideas? and again for ease the site is snafu-comics.com Thanks for your help! Having an issue with a drop down menu in firefox. I have a nav bar with drop down menus. Just below that is an embedded video. Everything works fine except for the drop down menu is behind the video on firefox. Looks fine in IE. I adjusted the z-index properties to make sure that the nav bar sits on top, but it still sits behind. ??? Is it a glitch of some sort? Does IE not support z-index attributes? I set some z-indexes and it seems to have fixed my issues in firefox, but not in IE. Hi everyone, I'm currently busy on a website which is viewable here The problem is the 'Top' image on the right side. It's supposed to be below the #shadow div (look at my source code) I tried changing the z-indexes to different levels but the top div keeps staying on top. If I turn it into a negative z-index, the mouseover doesn't work anymore.. Hope anyone can help Wouter hi, i've been reading extensively about the z-index issue that IE 7 suffers from (when using the "position" property) but i cannot for the life of me fix my problem. Basically i have a #menu that is positioned relative to a #wrapper. The dropdown menu works fine in all browsers except that in IE 7, the grey shadow that should appear behind the dropdown menu itself appears on top of the actual dropdown menu. If you view the same page using Firefox, the dropdown menu appears above the grey shadow as it should do. This is the EXACT behaviour i need. I need the dropdown menu and its shadow to appear above the "#content .box" below it, but i also need the shadow to appear behind the dropdown menu. I just need to replicate this exact behaviour you see in Firefox in IE 7. I need to keep the IE7 compatibility mode and the DOCTYPE as they are otherwise the other styles on my site will be affected. Please find the attached folder with all necessary code contained in it. Ignore the jquery.js file as its merely used for effects and is not causing the issue. BTW: its essential that the #menu is positioned relative to the #wrapper as i want it to appear further down in the HTML code for SEO purposes. Thanks in advance I have an object on my page with the following settings: Code: #myEmail { position:absolute; left:400px; top:50px; z-index:2; display:none; } and i have a video player in my form that looks like this: Code: <object id="Player" height="400" style="border:solid 1px black; z-index:1;" width="500" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"> <param name="URL" value="<% =GetPlayerUrl() %>" /> <param name="autoPlay" value="true" /> </object> Problem is, when the video starts to play, it moves to the top layer. What am i doing wrong? I'm wanting to put three items together with different z-indexes. The first div contains another div and a paragraph, all are positioned absolutely. I want the 2nd div to be higher than the p. The html is as follows: Code: <div id="sticker"> <div></div> <p>Text</p> The css is as follows: Code: div#sticker {width:146px; height:140px; background:url("stickerbase.png") no-repeat top left; position:absolute; top:20px; left:20px; z-index:10;} div#sticker div {width:115px; height:67px; background:url("stickerflap.png") no-repeat top left; z-index:20;} div#sticker p {position:absolute; top:40px; left:20px; z-index:15; background-color:#06c;} An example is at www.wattersisere.co.uk/devshed I want the text with the blue background to be behind the flap of the sticker! I even tried it out with an online z-index checker and couldn't get their code to do it. Thanks, Watters I worked it out, I had missed the position:absolute off the 2nd div. [sorry for any duplication... I just submitted this to the HTML list but suddenly realized it's really a CSS problem] I have a couple web pages that include relatively long pop-up "help" fields... implemented with the display and index style elements. With Netscape or Safari they look fine, but with IE or Opera, some underlying elements "bleed through"; that is, some elements from a div with a lower z-index, which should be behind, seem to float off the rear document and appear in front of the front document. All of the problem elements seem to be within forms and (probably more importantly) they all seem to be in a DIV other than the DIV containing the pop up. That is each structure looks something like: <div> <div> ... the pop up </div> <div> the rest of this section </div> </div> <div> ... some more stuff </div> the proplems are in the area in which the pop up overlaps later divisons. (not all items so conflict) ... any ideas? I am making a list of arrangements, and want a div containing further info to pop up, when you click the arrangement. To make sure the info-box is on top of the other DIVs, i have set z-index to 1. But i have a couple of scripts on the page, and they are allways places on top. I there a way to go around this? + Is it possible with a few simple changes to this script: Code: <script type="text/javascript"><!-- function showHide(boxName) { theBox = document.getElementById(boxName); if (theBox.className == "boxVisible") { theBox.className = "boxHidden"; } else { theBox.className = "boxVisible"; } } //--> </script> <body> <a href="news" onclick="showHide('news'); return false;">News</a> </body> So the target changes back, when the link is inactive. I've tried this: Code: <body> <a href="news" onmouseover="showHide('news'); return false;">News</a> </body> But then i have to pass the link again, to close the window again. An old site, http://www.naausa.org, doesn't work properly in IE7 as the hover links don't go over the changing image. It seems to be because of the IE bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html The site and code is ugly (inline CSS, tables, etc.), but I don't want to reinvent the wheel; I just want to solve the problem and get it over with. I've tried several things with no luck. Can anyone take a gander at the source code and give me a hint? Thanks, Jeremy On a site I'm trying to setup I have a header arrangement with a centrally placed image/logo (it's a png8). 1. It looks a bit decimated in IE6. Anyone know why? 2. The image is supposed to be absolute and on top but in fact the menu bar stays on top. All a problem in IE but not firefox. I'm obviously missing something basic! Help appreciated. Hi all, I've got a little request. Does anybody know how I could solve this issue: I want to have a menu hover on the left, and a menu hover at the top, while visitors can move the google map around in the background. I do this by setting my map div to z-index: -1, and it works good. Except it won't let people click on the map and move it around, even though there isn't a div ontop of it. http://pw.mmogm.com/0.0.5/frame.html The only other way I can think of it set the menu's to z-index: 1, but that would cause them to lag, and they're position would be fixed so when I "toggle" the menu, the top menu won't slide left. It's much nicer the first way, besides the clicking problem. http://pw.mmogm.com/0.0.5/frame2.html I greatly greatly any advice you might be able to shed on this issue. Thanks in advance if you can I am not sure why this is not working but I am trying to nest a div and overlay them. Code: <style> .txtImg { posistion: relative; z-index: 99; height: 72px; width: 100%; background: url(../../images/roycity-gpl-01.png) no-repeat left; } .logo { position: relative; z-index: 1; height: 72px; width: 100%; background: no-repeat right; } </style> <div id="txt" class="txtImg" align="left"> <div id="bg-img" class="logo" align="right"></div> </div> I have two elements. One has a z-index of 9999 and the other has 9000. Both elements are positioned. It is a modal popup window. When I open it, the element with a poistion of 9000 is on top of the one with 9999. I even checked to confirm that the z-index properties were the same once the popup completed. What could cause this? Hi, I am trying to position a logo at the foot of http://www.root.lamtha2.co.uk/cssproblem/ If you look at the source it shows, <div id="footer" class="navTextBottom"> <br /> <!-- #BeginLibraryItem "/Library/bottom_nav_bar.lbi" --><a href="index.html">Home</a> | <a href="#">Terms & Conditions</a> | <a href="#">Links</a> | <a href="#">Contact Us</a><!-- #EndLibraryItem --><br /> <span class="copyrightText">Copyright Apex Verhicle Rentals 2006</span><br /> <div id="lamtha2logo"><a href="http://www.lamtha2.com" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Lamtha2logo','','index_images/designed_by_l2_on.jpg',1)"><img src="index_images/designed_by_l2_off.jpg" alt="Lamtha2 Web Design" name="Lamtha2logo" width="89" height="29" border="0" id="Lamtha2logo" /></a> </div> <!-- end lamtha2logo --> </div> <!-- end footer --> Here is the css #footer { width:760px; font-size:12px; background-image: url(index_images/footer.gif); text-align: center; background-repeat: no-repeat; z-index: -2; } #lamtha2logo { height: 29px; width: 89px; background-repeat: no-repeat; z-index: 2; float: left; padding-left: 10px; margin-bottom: -35px; } Can anyone help me resolve why div #lamtha2logo is beneath div #footer thanks Hey all. I have the classic situation, a dropdown menu is not displaying because it is being hidden another another div. Only happens in IE. I know IE has some issues with handling Z-indexes, and not applying them right. I tried putting all my elements to position:relative, and setting the z-index on every stupid list item attribute, but no good. h t t p : / / f p i t e s t e r s . f o r c e . c o m / s i m p l e s t y l e Here is the relevent code. /* This is the div that ends up overlapping the menus */ #main-textarea { margin-left:auto; margin-right:auto; background-image:url({!URLFOR($Resource.FPITesters, 'body-bg.gif')}); background-repeat:repeat-y; width:736px; min-height:240px; padding-top:75px; position: relative; overflow:hidden; z-index:0; } #main-navigation { margin: 18px 0px 0px 448px; position: relative; z-index:10; } <div id="lightBlueBackground" name="lightBlueBackground"> <div id="header" name="header"> <div id="logo" name="logo"> </div> <div id="title" name="title"> </div> <div id="bread-crumbs" name="bread-crumbs"> <ul> <li>Home ::</li> <li>Current Page</li> </ul> </div> <div id="main-navigation"> <ul><li class="about-nav" id="about-li"><a id="about-a" href="javascript:loadPageSF('undefined')" onmouseover="javascript:slideDown('about-li')">About</a><ul><li><span><a href="javascript:loadPageSF('a0940000005phO7AAI')">Careers</a></span></li><li><span><a href="javascript:loadPageSF('a0940000005phObAAI')">Contact Us</a></span></li><li class="last-item"> </li></ul></li><li class="tester-nav" id="tester-li"><a id="tester-a" href="javascript:loadPageSF('a0940000005phOhAAI')" onmouseover="javascript:slideDown('tester-li')">Become a Tester</a><ul><li class="last-item"> </li></ul></li><li class="fundraising-nav" id="fundraising-li"><a id="fundraising-a" href="javascript:loadPageSF('a0940000005phO7AAI')" onmouseover="javascript:slideDown('fundraising-li')">Fundraising</a><ul></ul></li><li class="testinfo-nav" id="testinfo-li"><a id="testinfo-a" href="javascript:loadPageSF('undefined')" onmouseover="javascript:slideDown('testinfo-li')">Tester Info</a><ul><li><span><a href="javascript:loadPageSF('a0940000005phPAAAY')">Directions</a></span></li><li><span><a href="javascript:loadPageSF('a0940000005phOqAAI')">Forms</a></span></li><li><span><a href="javascript:loadPageSF('a0940000005phOvAAI')">Get The Scoop</a></span></li><li><span><a href="javascript:loadPageSF('a0940000005phP0AAI')">Recruiting Info</a></span></li><li><span><a href="javascript:loadPageSF('a0940000005phP5AAI')">Test Day Requirments</a></span></li><li class="last-item"> </li></ul></li></ul></div> </div> <div id="main-textarea" name="main-textarea"><div id="leftImage" name="leftImage"> </div><br> <br> <div id="rightText" name="rightText"> Hi folks I'm having a problem displaying a CSS navigation menu within a website in IE8. It displays OK in Firefox and Chrome, but as I say, not in IE8. I haven't tried any other versions of IE. The story is that I got the code from mycssmenu.com, and have tweaked it here and there to make it appear as desired. I can't remember if I touched the z-index values or not at that time. I understand that the problem lies with IE's interpretation of z-index and I have tried to fix this problem by randomly changing the z-index values, but that didn't get me anywhere. I accept that my ignorance CSS code is ultimately to blame. The code in question is as follows: Code: <style type="text/css"> .qmmc .qmdivider{display:block;font-size:1px;border-width:0px;border-style: solid;position:relative;z-index:1;}.qmmc .qmdividery{float:left;width:0px;} .qmmc .qmtitle{display:block;cursor:default;white-space:nowrap;position: relative;z-index:1;}.qmclear {font-size:1px;height :0px;width:0px;clear:left;line-height:0px;display:block;float:none !important;} .qmmc {position:relative;right:-473px;zoom:1;z-index:10;}.qmmc a, .qmmc li {float:left;display: block;white-space:nowrap;position:relative;z-index: 1;}.qmmc div a, .qmmc ul a, .qmmc ul li {float:none;} .qmsh div a {float:left;}.qmmc div{visibility:hidden;position:absolute;} .qmmc li {z-index:auto;}.qmmc ul {left:-10000px;position:absolute;z-index:10;} .qmmc, .qmmc ul {list-style:none;padding:0px;margin: 0px;}.qmmc li a {float:none}.qmmc li:hover>ul{left:auto ;}#qm0 ul {top:100%;}#qm0 ul li:hover> ul{top:0px;left:100%;} #qm0 { margin:0px; background-color:#FFFFFF; border-width:1px 0px; border-style:solid; border-color:#FFFFFF; } #qm0 a { padding:3px 10px 3px 8px; background-color:transparent; color:#444444; font-family:Arial; font-size:11px; text-decoration:none; border-width:0px 0px 0px 1px; border-style:solid; border-color:#BABABA; } #qm0 a:hover { background-color:#EFF4FA; color:#000000; text-decoration:underline; } #qm0 .qmparent { background-repeat:no-repeat; background-position:92% 50%; } body #qm0 .qmactive, body #qm0 .qmactive:hover { background-color:#EFF4FA; background-image:url("images/item_bg.gif"); color:#000000; text-decoration:underline; } #qm0 div, #qm0 ul { padding:5px; background-color:#FFFFFF; border-width:1px; border-style:solid; border-color:#333333; } #qm0 div a, #qm0 ul a { padding:3px 20px 3px 5px; color:#333333; font-size:11px; border-width:0px 0px 0px 4px; border-style:solid; border-color:#FFFFFF; } #qm0 div a:hover, #qm0 ul a:hover { text-decoration:none; border-color:#75B1C2; } body #qm0 div .qmactive, body #qm0 div .qmactive:hover { text-decoration:underline; border-color:#75B1C2; } </style> Can anyone see where the issue lies? Thanks very much. |