View Full Version : I need help with my cool idea
guitarnerd
June 10th, 2002, 02:16
I am trying to do something cool with my website and here is one of my ideas that I need help with...
I am using the full power off CSS with my redesign and here is my idea. Create a cookie somehow that if the person goes to your site again and already has the cookie it will display a different style sheet so basically the layout will be the same but the color template will be different. So I need to know how I could create a cookie to do this lol
I have only seen this done in flash and have never ran into a site with it using style sheets so don't steal my idea.
bigperm
June 10th, 2002, 05:10
It would be eaiser to just use a different, random stylesheet each time a page is viewed. If you had 5 style sheets, name them 1-5.css, and use this:
<? $random_num = rand (1, 5); ?>
Then link to the stlye sheets like this:
<link rel=stylesheet type="text/css" href="<?=$random_num ?>.css">
guitarnerd
June 10th, 2002, 15:59
THANK YOU! I will use that!
bigperm
June 11th, 2002, 02:55
You're welcome. ;)
guitarnerd
June 11th, 2002, 02:56
Originally posted by bigperm
You're welcome. ;)
It doesn't work :( what else can I try?
is0lized
June 11th, 2002, 03:30
your pages .php ?
bigperm
June 11th, 2002, 03:43
Works for me.
http://bigperm.net/random_css/
guitarnerd
June 11th, 2002, 05:50
His page wasn't in CSS...
If you don't mind could you explain where I need to place
<? $random_num = rand (1, 5); ?>
EDIT: Nevermind they are
guitarnerd
June 11th, 2002, 17:30
Could you just show me the html for entire page that you made that with. I need to get this working soon it is very important
bigperm
June 12th, 2002, 00:16
<? $random_num = rand(1, 5); ?>
<HTML>
<HEAD>
<title>Testing Random CSS</title>
<link rel="stylesheet" type="text/css" href="<?=$random_num?>.css" >
</HEAD>
<BODY>
<H1>Testing Random CSS</H1>
<h1><?=$random_num?></h1>
</body>
</html>There it is.
is0lized
June 12th, 2002, 00:59
and name it title.php
guitarnerd
June 12th, 2002, 01:59
Ahhh...I was putting it in the head...I tried it in the body too but that didn't work. index.php should work as well considering this will be on all my pages it will need a lot of titles
is0lized
June 12th, 2002, 02:01
random css will be annoying :p
guitarnerd
June 12th, 2002, 02:16
NO IT WON'T I will make all really cool colours templates and stuff. Maybe I will also let people choose what template they want. It won't be annoying that will be really cool.
Did I ask you anyway Is0lized? No you haven't help me a bit you are just lingering around posting to get more posts
BTW Bigperm I got it working Thanks A TON! You are da man!
MENJ
June 12th, 2002, 02:41
Originally posted by guitarnerd
I have only seen this done in flash and have never ran into a site with it using style sheets [/B]
Actually, there is a site I know of which uses random CSS each time you reload the page:
http://www.brownpau.com
What about it, folks? :D
guitarnerd
June 12th, 2002, 02:45
Originally posted by MENJ
Actually, there is a site I know of which uses random CSS each time you reload the page:
http://www.brownpau.com
What about it, folks? :D
That is really annoying I just want the colors to change not the whole website lay out.
He uses XML by the way
is0lized
June 12th, 2002, 03:20
1) your asking everyone
2) i dont care about post count, peo could reset my count to 0, i wouldnt mind one bit, so know what your talking about before you get defensive
3) i was giving my opinion - so dont tell me if im right or wrong, its my opinion not yours, so back off :rolleyes:
4) i dont think4.17 posts per day is spamming
5) cant you edit your own post in this thread? basicly THAT ups your post count, there is an edit button :biggrin2:
guitarnerd
June 12th, 2002, 03:25
random css will be annoying
1) So tell me what does that have to do with telling me how to have a page display a random style sheet?
2) I am not asking for opinions
3) you always respond to things you can not help with so don't
Ogar!
is0lized
June 12th, 2002, 03:30
im gonna say this one last thing off topic, i did try and help by asking if your pages where php and such, so back off... you just love to fight with people, you can another member should be good friends by now.
i dont know why you attitude has to be so negative when i try to help some and state my opinion...
and before you go off and say something along the lines of ''you always have a bad attitude'' im a nice guy in real life, but a ton of people on this forum do really stupid things, and act very stupid and i respond with the truth in my opinion, so if you think thats rude, put me on ignore....
im reporting this thread to a moderator since you've got what you've needed and now its going to be a flame fest
guitarnerd
June 12th, 2002, 03:33
Yes the thread can be closed
No hard feelings. Stating my opinion as well
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.