Friday, June 18, 2004

CSS

Background Changing with CSS and Javascript: Ever wanted to have different background for your site and have them change on the fly? Now you can.

Step 1: Create a different class for each image / background style you want to use in your document.
Example:
<style type="text/css">
<!--
body.brown {
background: #000000 url(brownBack.gif);
}
body.red {
background: #000000 url(redback.gif);
}
-->
</style>

Step 2: Create one link for each style you created above.
Example:
<a href="#" onMouseDown="body.className='brown';">One</a>
<a href="#" onMouseDown="body.className='red';">Two</a>

Step 3: Enjoy. That's it! I don't have an example site up right now but hopefully I will in the future.

More Info...

I have added some more info about The Tutorial Site over at the Website Forums. [ link to post ] Also, if you have any requests just post a comment here and nicely ask for your tutorial. We'll see what we can come up with.

Welcome to the Tutoral Site

Welcome to the Tutorial Site. Here we will be adding tutorials for anything and everything you want. Could be Flash, HTML, Search Engine Optimization, Wrestling, Video Games or PHP. Anything. If you wanna post a tutorial you are more than welcome! Just post a comment to this post with your email, or email send me an email over at http://www.twistermc.com and ask for an account. Also, be sure to check out our Website Forums.