3

I have a layout at the moment with two main divs, both have to be full width and height, but obviously you can only see one at a time.

I'd like a nice transition when swapping between the two, as opposed to a simple fade/show.

I've tried to make it so one div slides out at the same time as the other Div sliding in, but due to positioning and layout, one div is forced under the next.

Images displaying issue: enter image description here

enter image description here

Here's a fiddle displaying the issue: http://jsfiddle.net/bazzlad/spbyk/1/

1 Answer 1

4

Change:

#test {
    background: #fff;
    height: 100%;
    display: none;

}

to:

#test {
    background: #fff;
    width: 100%;
    height: 100%;
    display: none;
    position: absolute;
}

JsFiddle: http://jsfiddle.net/spbyk/3/

Enjoy and good luck!

1
  • Unfortunately I'd tried that - it works, but it also breaks my layout :S - Thanks for the help - I'll keep trying!
    – Richard
    Commented Jul 20, 2012 at 10:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.