Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Help with div layers?

Help with div layers?
Thread Tools
Dedicated MacNNer
Join Date: May 2002
Location: Brooklyn, NY
Status: Offline
Reply With Quote
Jun 10, 2003, 12:50 PM
 
Hi all,
I'm having some trouble with div layers and i was wondering if y'all could help.

I have one set of div boxes that I'd like to be UNDER another set.

Here's my styles:

div.messagepost{
padding: 0.5em;
border: solid;
border-width: 1px;
border-color:rgb(0,0,0);
text-align: left;
z-index: 5;
}

div.berrybox{
z-index: 2;
position: fixed;
top:500px;
left:130px;
}

The message post ones are made on the fly by PHP, and the berrybox ones are individually made in html. The problem is that no matter what values I put for the z-indexes, the berry box is always OVER the message posts. Oh, in the html, the berryboxes have an img in them, (if that makes any difference).

Thanks for your time!
gabe

EDIT:
The message boxes are also in a table if that has anything to do with it. Perhaps I need to set the z-index of the table if that's even possible?
     
Dedicated MacNNer
Join Date: Aug 2002
Status: Offline
Reply With Quote
Jun 10, 2003, 06:26 PM
 
a) microsoft internet explorer does not support position: fixed

b) i'm not clear on how you're doing the messages... is each one in a seperate div?
i assume that the div is around the table tag.

c) possibly try defining them as
#messagepost {}
#berrybox {}

just some thoughts
--will
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Jun 11, 2003, 08:46 AM
 
You may have to give them the position:relative property in order to get z-index to work.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
Senior User
Join Date: May 2000
Location: Lafayette, IN, USA
Status: Offline
Reply With Quote
Jun 13, 2003, 10:41 AM
 
microsoft internet explorer does not support position: fixed
Very true, although I've seen some interesting workarounds....

What I've done on my latest site is use <nobr>{ position:absolute }<nobr> in the initial #divname declaration, immediately followed by
<nobr>body>div#divname { position:fixed }.</nobr>


Internet Explorer doesn't support body>div, so it just skips over it. Every other browser supports it just fine, and replaces the
position:absolute appropriately.

Doesn't necessarily help the initial problem, but food for thought....
“The trouble with quotes on the Internet is that you can never tell if they’re attributed to the right person.”
—Abraham Lincoln
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:41 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2