Changing divs from vertical to horizontal stack [56k warn]

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Changing divs from vertical to horizontal stack [56k warn]

Post by Luke »

I am building a site that has some information lined up on the right of it. It is 3 divs stacked on top of eachother in an outer div that floats right. When the user's window is less than 1000px, it needs to pop those divs down under the content of the page, and display the three divs horizontally instead. So basically this...
Image
Is this possible?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Damn. That's about all I can say about that. I think it is possible, but I think you are going to have use javascript to do it. I can't think of any other ways.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

It seems like it should be possible without javascript... float the outer div left and make it take up 100% width, and then all the divs inside float left... but that doesn't work.
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Post by Zoxive »

The Ninja Space Goat wrote:It seems like it should be possible without javascript... float the outer div left and make it take up 100% width, and then all the divs inside float left... but that doesn't work.
I actually messed around with it for a bit, and i would just use javascript.

http://www.zoxive.com/test.php

-NSF
Post Reply