Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

zIndex?

Featured Replies

I've been working on a portfolio website for a friend of mine recently, got the main design done (still need to do the content/slideshow/gallery bit) but I have one problem. Everything validates nicely and it looks the same on everything i've tried it in (IE7, Opera and FF, I haven't got access to IE6) but I'm having problems with the "Pong" parts of the website.

 

They're 3 absolutely positioned DIVs which create a bit of a Pong thing in the background, however i want them to be "underneath" the rest of the website on the z-index. I've tried setting it to 1 and 100 but it seems IE7 doesn't play nicely? Anyone got any ideas of how to remedy this?

 

http://simon.benanderton.co.uk/

 

Edit: He's a computer games designer by the way if anybody is wondering what's with all the game aspects.

Have you got a screen shot of how it should look?

Looking at it in Firefox, I can see the three divs with a white background(2 at the top left and 1 at the bottom right) but I'm not sure how/where you want them.

IE set the z-index differently from other browsers. Here is a good explanation of it.

  • Author
Have you got a screen shot of how it should look?

Looking at it in Firefox, I can see the three divs with a white background(2 at the top left and 1 at the bottom right) but I'm not sure how/where you want them.

IE set the z-index differently from other browsers. Here is a good explanation of it.

 

Yeah that's how it's supposed to look, it's supposed to be remminiscent of the game Pong. Does anybody know of a fix for the z-index problem? It's not a problem until the browser window is resized so that the pong items are ontop of the main content (as they're anchored at the sides of the browser window).

I seem to remember having to use a negative z-index on absolutely positioned divs for it to take affect.

 

(although I may be wrong)

IE6 doesn't support min-height:

 

#realcontent {

width: 100%;

min-height: 500px;

(you could use conditional comments for IE6 and just apply a 500px height)

-------------------------------------

Now, regarding you're problem you could use a min-width for the body (see previous IE6 issue) so that the absolute divs don't end up beneath the layout on resize.

If they are absolute divs you could also concider changing the position of the divs in your HTML document so they fall behind the content.

 

Using negative z-index will probebly cause some problems in Firefox, i've struggled with this also :p

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.