CSS - Position: Absolute And Z-index Issue In Ie6
Hello all, I am having a problem I can't seem to figure out.
The site is: http://www.ciccotticenter.org/test_site/ When you view the site in IE6, the logo in the top left corner disappears. I have tried everything I can think of. Interestingly when I add * { border: 1px solid red; } it works. But I can't figure out what thats doing to make it work. Any ideas? Thanks, Ryan Similar TutorialsPlease look at this page - http://casadelsol.tmhdesign.com/about.asp I have a div with an id of "header". In that div I placed this code Code: <div style="width:200px;height:200px;background-color:yellow;margin:0 0 -50px 400px;z-index:10000"> </div> As you can see it goes under the absolutely positioned div element with an id of top_header. I want to put a drop-down menu in the top header area but it slides under the top_header element. Can you help? Thanks I can't figure out why the ul with the id #two is not responding to my position attempt. It is child of an li in the ul w/ a class .menu on www.eagletransmission.net If you mouse over Gallery the dropdown should be flush with the left side of the parent li but it is not. Aaaaargh Tom I have having issues with IE displaying my page wrong. The page is http://]http://tampabay-online.org/cetr/about.php (or any page within that site) and the css can be found at http://tampabay-online.org/cetr/cetr.css It displays fine in Firefox and Opera but IE makes the content class lower from the top than the #right navigation bar (they should both be 20 pixels form the top) Any help much appreciated. Code: .content { position:relative; width:320px; margin-left: 125px; margin-top: 20px; border:1px solid black; background-color:white; padding:10px; z-index:3; } #right { position:absolute; width:200px; top:20px; left:500px; border:1px solid black; background-color:white; padding:10px; z-index:1; } I'm putting together a site using a CSS template, and hefty use of position: absolute. You can view it he http://www.goldenturmeric.com/layout.php The layout comes out great in FF 2.0 and IE 7. However, the main body of the site doesn't come out at all in IE 6. I've monkeyed around a little with changing to position: relative and a few other things and it completely throws it off. I'm sorry if I'm not doing this the right way or position: absolute is avoided or something. If so, I didn't know. Anyone's help is much appreciated. Im trying to get an image to center in a div. It works as long as one part of my CSS is commented out. The issues is the part that is breaking it, is required for another script to run that I have not added in due to its vast amount of code. Can anyone tell me a workaround.. leaving the MUST have code in place. Im willing to add anything to the code, just not remove if possible. Full Code Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <style type="text/css"> #image { display: table-cell; text-align: center; vertical-align: middle; width:356px; height:356px; border:1px solid blue; } #image * { vertical-align: middle; } /*\*//*/ #image { display: block; } #image span { display: inline-block; height: 100%; width: 1px; } /**/ </style> <!--[if IE]><style> #image span { display: inline-block; height: 100%; } </style><![endif]--> <style type="text/css"> #image img {position:absolute;} </style> </head> <body> <div id="image"><span></span><img src="http://www.google.com/logos/olympics08_rhythm.gif"></div> </body> </html> Code that MUST stay in the CSS Code: #image img {position:absolute;} Just to note, the rest of the code is for the most part an exact dup of the cross-browser image center in div code here, http://www.brunildo.org/test/img_center.html If I do something like this: .divSubHomeRtPhoto { position: absolute; left: 340px; top: 167px; width: 420px; height: 420px; } Then <div class="divSubHomeRtPhoto"> my left and top positions don't seem to take in IE 5.2 for Mac. This seems to be fairly well known, from what I read on the internet. What this means for me though, is that I have to almost do away with positioning through CSS if I want my pages to work with IE 5.2 Mac, whcih I recently discoverd I do want to work. How do other cross browser CSS writes deal with this problem? Thanks for your help CJB IE browser seems fine but mozilla display a simple table with links inside in a squished up format, not present on the web design. Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <meta name="GENERATOR" content="PageBreeze Free HTML Editor (http://www.pagebreeze.com)"> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" > <title>mybar.html</title> </head> <style type="text/css"> #elButton a { color: #000000; font-size:10px; font-family:verdana; font-weight:bold; text-decoration: none; /*border:1px outset aqua;*/ /* background-color:#00ffff;*/ border-right-style:solid; border-right-width:1px; width: 110px; /* padding: 3px 5px;*/ /*margin: 1px;*/ } </style> <body bgcolor="#ffffff"> <p> <table style="WIDTH: 487px; HEIGHT: 26px" cellspacing="0" cellpadding="0" width="487" align="right" bgcolor="#00eaea" border="0"> <tr> <td valign="top" align="middle"> <div id="elButton"> <a href="#">Java Script</a> <a href="#">Dynamic HTML</a> <a href="#">Server Side</a> <a href="#">Client Side</a> </div></td></tr></table></p> </body> </html> Is it possible to position something below a division that has the property { position: absolute } and can expand to a varied length depending on what is contained with it? The question is "What is the positioning context of a div positioned absolutely (e.g., div#nav{position:absolute;}); that is, where is the 0,0 coordinate from which any offsets will be measured?" Is the answer "it will be measured from the top left"? Hi, I'm attempting to float a menu (in a table) just to the left of a table I'm centering on my page. The menu, idealy, will be sticking out the left side of the table. Below is the code, firstly, for the menu and secondly, the CSS for the menu. html Code: Original - html Code <!--FLOATING MENU--> <table id="menu" cellspacing="0"> <tr> <td class="mbutton" onmouseover="this.className='obutton';" onmouseout="this.className='mbutton';"> Button </td> </tr> <tr> <td class="mbutton" onmouseover="this.className='obutton';" onmouseout="this.className='mbutton';"> Button </td> </tr> <tr> <td class="mbutton" onmouseover="this.className='obutton';" onmouseout="this.className='mbutton';"> Button </td> </tr> </table> <!--FLOATING MENU--> <table id="menu" cellspacing="0"> <tr> <td class="mbutton" onmouseover="this.className='obutton';" onmouseout="this.className='mbutton';"> Button </td> </tr> <tr> <td class="mbutton" onmouseover="this.className='obutton';" onmouseout="this.className='mbutton';"> Button </td> </tr> <tr> <td class="mbutton" onmouseover="this.className='obutton';" onmouseout="this.className='mbutton';"> Button </td> </tr> </table> css Code: Original - css Code #menu { position: absolute; top: 100px; left: 28%; z-index:0; width:70px; border-left: 2px solid #000; border-right: 0px; border-bottom: 2px solid #000; border-top: 2px solid #000; padding:0px; } #menu { Now here's what's going on. As you can see, I'm trying to use a percentage from the left to align the menu - but as the resolution/window size changes, so does the menu's position in relation to the table. I need a stable way to make sure the menu is always in line with the table. Firefox and Mozilla also seem to be rendering the positioning a lot differently. I've thought about relative positioning, but I can't figure out exactly how it works or find a good tutorial on it. If anybody has a link to a tutorial on specifically this area, that would be great - or if you know the answer, I'd very much appreciate it if you could help me out. Thanks in advance - feel free to say so if you'd like more information. Hi there, I have a show/hide div and want it to appear on top of my other layers, however, when I use absolute to get it to appear on top of the other layers, with left and top positions, it appears in different places when I resize my window or change my resolutions. Is there anyway to make it appear the same no matter what resolution or window size? I am using pixels by the way. Thanks. Hi everyone, I found how to position imgs and txt relative to the browser window, but when i print it out it will be like 3/4 inch from the edge of the paper, even though the page border is set at 1/2 ... Anyway I can get it closer? Found this piece of code from another page but didn't seem to work <STYLE TYPE="text/css" MEDIA="print"> thanks Hi css-ers, I wonder if anyone can tell me what I've done wrong. I have an absolutely positioned div that shows up perfectly in all browsers except IE 6 (I haven't tried it in IE7 yet). I have another abs pos div on the page that behaves perfectly. Any suggestions? This is the x/html: Code: <div id="logo"> <a href="index.html"></a> </div> This is the CSS: Code: #logo { left: 20px; top: 0px; position: absolute; z-index: 5; margin: 0pt; border: 1px solid #315185; } #logo a { background: transparent url(../images/logo.jpg) no-repeat scroll 0px 0px; display: block; height: 435px; width: 140px; } #logo a:hover { background: url(../images/logo.jpg) no-repeat scroll 0px -435px; display: block; height: 435px; width: 140px; } Thanks for any tips or references. Sorry for a link and not pasting but code but I want to be sure not to miss anything out ... There should be a menu item at the top of the page of: http://egg.epicdesigns.co.uk/home/index.php It shows up fine in Mozilla and Opera but not MSIE. Code: #menu { z-index:1; left:auto; top:272px; position:absolute; width:631px; margin:0px 0px 0px 12px; padding:0px; font:normal 110% agency fb,arial,sans-serif; } I notice that if I remove the <HEAD> tag int he HTML or the FLOAT:RIGHT styling on #sidebar then thigns show up as expected. Thanks in advance. Hi, I have a table with the following div : div#mod-banner { height:60px; position:absolute; right:180px; top:22px; width:468px; } in IE7 and Opera looks ok but in IE6 it shows it like its left aligned or something. I dont have any knowledge of CSS , can anybody help me? Thanks Alright, here we go again. The page in question... Various screenshots I'm working up a sample for a job I came across. The scenario: He wants a simple layout: top header, left column, mid (main), right column, and bottom header. The width of the body should be no more than 650 pixels and centered. However, he wants the html flow to be in order of: main, top header, left column, bottom header, right column. Obviously is going to require absolute positioning, right? So, using Win XP, I got it to look descent in IE 6, Net 7, and FF 1. Those are the three browser brands he's concerned about; the last two versions of each (didn't specify operating system). Basically, I'm just asking for someone to look at the source code and tell me if there's a simpler way. The way it's set up now, it renders poorly on several different versions of IE, Net, and Moz under other operating systems (which you can view in the screenshots URL above). Plus, the heights are not constant. Meaning that he will always be adding/changing content meaning he'll always have to mess with the positioning. Is this absolutely worthless? Problem is I don't want to give up because it is fun to learn (plus there's two other potential jobs behind it). It's starting to seem, however, that there will be no easy fix and perhaps the answer is unachievable in this situation. Any advice? I am a newbie to CSS and HTML I am trying to understand how div positioning works I made a CSS and a class container where I did put some thing now I made another class say named useful which is placed inside div tags of class container white I am finding problem is when the next div element of class useful is placed then its position is not coming as I desire some one told me to use float to over come it worked when I used an image but it did not worked when it was not an image here are the contents of my CSS about which I am asking .header_container { margin:auto; height:101px; width: 1290px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: #D5EDB3; border-right-color: #D5EDB3; border-bottom-color: #D5EDB3; border-left-color: #D5EDB3; } .header { background-image: url(n/mm_health_photo.jpg); height: 101px; width: 382px; } .header1 { position:relative; background-color: #D5EDB3; height:101px; width: 908px; float:left; border-left-color:#999900; border-left-width: thin; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: solid; margin-left: 381px; margin-top: -101px; } Now the problem is in above CSS margin-left and margin-top has been used which I dont think is needed following is my html code <!-- Header Container Startts --> <div class="header_container" > <div class="header"> </div> <!-- header container left image in this box --> <div class="header1"></div> <!-- the right side of header --> </div> <!--Header Finishes here --> Hi folks, Just got one of those "can I or can't I" questions that relates to position:relative and position:absolute. I have the following structure - Code: <div> <div style="position:relative"> <ul style="position:relative"> <li> <p> <span style="display:block"></span> <span style="display:block"></span> <span style="display:block; position:absolute"></span> </p> </li> </ul> </div> </div> The Third Span is where I am not sure about. I'd like it to sit at the bottom right of the enclosing <p>. When I use <span style="display:absolute; bottom:2px; right:2px>, the whole span disappears - not exactly sure where it vanishes to. Without the bottom and right declarations, the span stays put. There is sufficient space within the <p> for the <span> to move about. This absolute positioning worked fine without the relative div and relative ul - so I am assuming that's where my issue lies. BUT, I need the outer structure and it's not an option to change anything except the third <span>. Question is: Is what I am attempting going against the grain and something that just isn't going to work? If so, what steps can I take to position the contents of the <span> where I need it? I have tried making the <span> fit the width of the <p> and then positioning the internal contents to text-align:right. I can't do a padding-top or margin-top as the content in the second span is variable. Any clever ideas? |