/    Sign up×
Community /Pin to ProfileBookmark

z-index problems in IE7

Hi there, I am having some difficulty stacking elements with the z-index.

I have a content area that has a border that must be several image. So div 2 is the top of the border. Div 3 is the strechable area of the border, and contains my #content div. Div 5 is the bottom part of the border. I use negative margins to put div 3 into the right area. I want div 2 and 4 to overlap over div 3. But I want the content in div 4 (which is within div 3) to go above everything.

Any suggestions?

HTML:

[CODE]<div 1>
<div 2/>
<div 3>
<div 4/>
</div 3>
<div 5/>
</div 1>
[/CODE]

CSS:

[CODE]#div 1 { z-index: 20 }
#div 2 { z-index: 30 }
#div 3 { z-index: 25 }
#div 4 { z-index: 100 }
#div 5 { z-index: 30 }[/CODE]

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@Andyram2kJul 19.2009 — Hi BFTrick,

Have a read of this and it may help you on your way:

http://www.yourhtmlsource.com/stylesheets/csslayout.html

If not, come back and we'll see if we can get it sorted ?

Hope this helps.

  • - Andy.
  • Copy linkTweet thisAlerts:
    @WebJoelJul 19.2009 — The default 'position' is always "position:static;" In order for "x-index:foo;" to work, the element MUST be one of the "[B]relative[/B]" or "[B]absolute[/B]" position. :-)
    ×

    Success!

    Help @BFTrick spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 4.29,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,

    tipper: @Samric24,
    tipped: article
    amount: 1000 SATS,
    )...