PDA

View Full Version : Toggle CSS Div / style width buttons?


dutchbb
09-12-2009, 02:19 PM
I've been looking and searching for this but couldn't exactly find it.

What I would like to do (not sure if it's possible the way I explain) is have 3-4 CSS based buttons in my layout, each changing the width of the main centered Div on the page when pressed. So you would have:

Button1 -> makes main DIV 750px
Button2 -> " " " 1000px
Button3 -> " " " 100%

So the user would get the feeling he can quickly switch between layout widths. Is this possible with just CSS or do I need Javascript? A simple/quick tutorial would be awesome.

Thanks.

dutchbb
10-04-2009, 10:27 AM
bump.. someone?

agitated
10-04-2009, 10:38 AM
This might help..

http://www.thesitewizard.com/javascripts/change-style-sheets.shtml