amzie — 2011-04-07T16:32:49-04:00 — #1
Im not sure Im posting in the right area, but here goes,
Iv come across a really good website thats used excellent css or I think good use of html pages to program a site to have a different coloured theme each time you click onto the company logo, or just generally click on to the homepage.
When you click on the logo it changes to i.e blue, green , etc and a few other elements on the page and a number of pictures on the top right hand corner.
However I have been trying to suss out the code but how can you have mulitple home pages (you can only save one document to home.htm)
that contain the <link rel="stylesheet" type="text/css" href="17.css" media="screen" /> where the different themes are.
I dont get it. :wall:
i would like to post the link but Im not sure if i can as it belongs to a web design agency but Im just exploring and looking at different types of cool websites to build as I want to build one for my own business.
any help or suggestions ?
csu_bill — 2011-04-07T17:48:10-04:00 — #2
It is likely they are changing the CSS. Check css Zen Garden: The Beauty in CSS Design for a site that has something like what you are describing. To get a different CSS each time, you are likely storing something with a cookie.
I did something similar when a friend wanted to see what his site would look like with different colors. He could visit his site, and click on a link to change the look of his site.
spikez — 2011-04-07T18:31:00-04:00 — #3
Post the link amzie
dresden_phoenix — 2011-04-07T21:06:03-04:00 — #4
it could be a very simple jquery trick... done by changing the root element's ID or CLASS... maybe even a stylesheet refresh?
amzie — 2011-04-10T17:13:09-04:00 — #5
Ok here goes guys
Belgrade Theatre, Coventry :: Box office - 024 7655 3055
i just the love the way the theme changes any ideas on how i could do this
dnordstrom — 2011-04-10T18:02:06-04:00 — #6
allanp — 2011-04-10T20:34:29-04:00 — #7
This small script, loaded into the head of your document will randomly write a <link> to either css_1.css or css_2.css. The problem with it is that you are likely to get a string of the same css files (eg: 1,1,1,1), rather than first one, then the other (eg: 1,2,1,2). To achieve a sequential cycle you would need to store the previous selection in some way. A possibility is a cookie.
document.write('<link rel="stylesheet" type="text/css" href="css_'+randNo+'.css">\
dresden_phoenix — 2011-04-10T22:22:48-04:00 — #8
you could use session variables to co code a sequence in PHp, if that's what you want
amzie — 2011-04-11T05:46:35-04:00 — #9
Yes, but its not just the logo its the column on right hand side and small image on the top right hand corner.....:weyes:
spikez — 2011-04-11T06:35:51-04:00 — #10