Edward Posted April 2, 2008 Share Posted April 2, 2008 Hi, Here is a simplified version of my code. I am trying to get the contents of the second cell to be placed behind (in terms of layers) the cell before it. It works fine on Safari on Mac, but not on IE on Windows. I was fiddling with the code recently and got it to work, but made further changes and now it's broken again and I can't figure out what I did to get it working. At the monent IE shows the correct positions, but it always displays the first cell at the back, instead of at the front. I tested it without any links to external CSS and there was no improvement so the problem must be in this code. Please can someone help? <body> <div style="width: 100%; margin: auto;"> <table style="width: 1000px; margin: auto"> <tr> <td style="width: 1000px; text-align: center; vertical-align: top"> <div style="position: relative;"><img src="images/bg_grad.gif" style="width: 1000px; height: 400px; top: -200px;" alt="" /></div> </td> </tr> <tr> <td style="width: 1000px; height: 200px; text-align: left; vertical-align: top;"> <div style="position: relative;"><img src="images/bg_grad.gif" style="position: absolute; z-index: -1; width: 1000px; height: 400px; top: -200px;" alt="" /></div> </td> </tr> </table> </div> </body> Quote Link to comment Share on other sites More sharing options...
haku Posted April 2, 2008 Share Posted April 2, 2008 set the position of the first image to absolute as well. I don't know if this will help though. If you are doing this for SEO purposes, be careful, it has the potential of getting your site banned from search engine indexes. Quote Link to comment Share on other sites More sharing options...
Edward Posted April 3, 2008 Author Share Posted April 3, 2008 Unfortunately I can't set the first cell's position to absolute as on my actual site it won't just contain an image, it will contain text and variable length content, so it needs to be relative so the cell length expands to accommodate it. No, it's no for SEO purposes at all. This is really frustrating as it's fine in Safari and the code seems logical to me. I thought it was quite a straight forward ting to do, are you saying I should perhaps avoid using z-index? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.