Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text style changer

Status
Not open for further replies.

dfelstead

MIS
Feb 7, 2006
7
GB
Hi

I'm designing/building a site and want the titles for the site to change fonts, styles etc each time it loads.

The title will be html text and I ideally I wanted the text to say have a number variations such as a choice between fonts, a choice between styles (underlined, strikethrough, bold, italic etc) and possibly sizes as well. Each time the page loads the script selected one from each of these attributes so every time the titles will be different, sometime it will be in Times, underlined and at 36pt and another time it will be Arial, bold and 24pt.

If anyone can help with this I would be most grateful.

Cheers
Daniel
 
Have you considered making up several CSS files and then using server-side script to randomly pick amoung them?
 
Suggest you develop multiple different classes (and save them in your CSS file) and then output a random class (based on the ones you have built) when you deliver the page.

You would use a server-side environment to choose the random class to use, and to insert it in the page before the page itself is delivered to the browser.

Based on what server-side environment you use (PHP, JSP, ASP etc) you should ask in that particular forum (only because you'll get an answer a LOT faster).

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Thanks for the help, I'll put a posting on the php forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top