Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-04-2008, 12:56 PM   PM User | #1
Spudhead
Senior Coder

 
Spudhead's Avatar
 
Join Date: Jun 2002
Location: London, UK
Posts: 1,856
Thanks: 8
Thanked 110 Times in 109 Posts
Spudhead is on a distinguished road
jquery toggle blind with negative margins

This is probably best illustrated with an example, so: example

(Click the "Information Architecture" header to fire the effect)

The problem I have is this:

The light grey content box, with the dark grey header inside it, should slide into and out of visibility - which it's doing.

However, also I need the blue background image on the header bar to overlap the dark grey content header.

The way I've got this at the moment, I've simply used a negative topmargin on the content box to move it up, and z-index on that and the header bar to move it underneath. This does the job while everything is static. But while the animation is... animating, the effect is lost - the dark grey is no longer visible underneath the blue header image.

I'm not really sure what's causing this, whether its root is a CSS or JS issue. But I'd really appreciate any suggestions....

Cheers.
Spudhead is offline   Reply With Quote
Old 09-04-2008, 02:33 PM   PM User | #2
Spudhead
Senior Coder

 
Spudhead's Avatar
 
Join Date: Jun 2002
Location: London, UK
Posts: 1,856
Thanks: 8
Thanked 110 Times in 109 Posts
Spudhead is on a distinguished road
No worries, figured it out. Took out the negative topmargin and used relative positioning with top: -5px; instead.

(doh )
Spudhead is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting 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

Forum Jump


All times are GMT +1. The time now is 02:44 PM.


Advertisement
Log in to turn off these ads.