Reply
Major help, CSS or what?
Old 01-16-2005, 12:42 AM Major help, CSS or what?
Novice Talker

Posts: 14
Ok, I would like to make a css style sheet, actually many of these, so the users of my site can choose which which template to choose. I do not even know where to begin, please help....
cool291 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 01-16-2005, 01:00 AM
Experienced Talker

Posts: 38
needs PHP
get Blog:CMS, it has a skin changer module installed. Rip the plugin off and configure it with your site.
or just use Blog:CMS in your site!
eDevil is offline
Reply With Quote
View Public Profile
 
Old 01-16-2005, 03:53 AM
Webmaster Talker

Posts: 623
Location: Kokkola, Finland
doesn't necessarily need php...
http://www.alistapart.com/articles/n4switch/

and you can find other style sheet switchers on there
davemies is offline
Reply With Quote
View Public Profile Visit davemies's homepage!
 
Old 01-16-2005, 12:34 PM
TaylorAtCTS's Avatar
Webmaster Talker

Posts: 501
Location: Memphis, TN, USA
True, it needs javascript or PHP.. PHP is better in my opinion
__________________
Memphis Web Design - Memphis Website Design - Memphis Website Development

Custom Tailored Solutions designs the best looking, most functional customized marketing solutions from web design to brochures with a 100% satisfaction guarantee, all for a price that fits your budget.
TaylorAtCTS is offline
Reply With Quote
View Public Profile Visit TaylorAtCTS's homepage!
 
Old 01-16-2005, 04:27 PM
Novice Talker

Posts: 14
Ok, I can't understand either one, can some one Im me and walk me through it?

Yahoo - proffdumbledor
AIM - cooly29129
MSN - cooly291

Last edited by cool291 : 01-16-2005 at 06:21 PM.
cool291 is offline
Reply With Quote
View Public Profile
 
Old 01-16-2005, 06:24 PM
ACJavascript's Avatar
Humble Mod

Posts: 548
Location: CT, USA
Hey,

You can use Javascript to create a cookie to store what kind of style they want. Simply read the cookies value to see the style.
__________________
CYTech-services.com - 100 Satisfied Customers - Custom Programming and Web Development
ACJavascript is offline
Reply With Quote
View Public Profile Visit ACJavascript's homepage!
 
Old 01-16-2005, 06:35 PM
Novice Talker

Posts: 14
yes, but i need to know how to do this, what to put in the css style sheets. I am completely lost.
cool291 is offline
Reply With Quote
View Public Profile
 
Old 01-16-2005, 07:04 PM
Novice Talker

Posts: 14
ok, I am holding up the construction of my site to figue out how I need to do this. So if it is possible to get some major help so I can begin construction on the site, please help!
cool291 is offline
Reply With Quote
View Public Profile
 
Old 01-16-2005, 10:25 PM
NateDogg's Avatar
Extreme Talker

Posts: 163
Ok... first you do not have to delay production. You can design and test all of your CSS by just changing the link statement (<link rel="stylesheet" type="text/css" href="first.css" /> to <link rel="stylesheet" type="text/css" href="second.css" />) and do this until you get all of your CSS done. Then work on the switcher.

I am using this code from one of my college instructors site:

Code:
		<script type="text/javascript">
		<!--
		//var browserName=navigator.appName;
		//var browserVer=navigator.appVersion;
		//window.status="You are using " + browserName + " " + browserVer + " to view this web page.";
		window.status="Last modified " + document.lastModified;

		function setStyle(the_style)
		{
			//define expiration date as a long time from now
			var the_date = new Date("December 31, 2024");
			var the_cookie_date = the_date.toGMTString();

			//initialize cookie and add info to it
			var the_cookie = "divinentd_style=style:" + the_style;
			the_cookie = the_cookie + ";expires=" + the_cookie_date;

			//drop the cookie and refresh the page
			document.cookie = the_cookie;
			document.location=document.location;

		}

		//read the cookie
		var the_cookie = document.cookie;

		//break up the cookie
		var broken_cookie = the_cookie.split(":");
		var style = broken_cookie[1];

		//write a call to an external stylesheet based on the cookie
		//undefined defaults
		switch(style) {
			case 'style_1':
				document.write("<link rel='stylesheet' href='styles/style1.css' type='text/css'>");
		   		break;
			case 'style_2':
				document.write("<link rel='stylesheet' href='styles/style2.css' type='text/css'>");
		   		break;
		  	case 'style_3':
				document.write("<link rel='stylesheet' href='styles/style3.css' type='text/css'>");
		   		break;
		   	case 'style_4':
				document.write("<link rel='stylesheet' href='styles/style4.css' type='text/css'>");
		   		break;
		  	default:
		  		style = 'style_1';
		  		setStyle(style);
				document.write("<link rel='stylesheet' href='styles/style1.css' type='text/css'>");
		   		break;
		 }
</script>
I believe that this "should" work. You may be required to modify it.
__________________
Nathan

Become an affiliate
Web Design Web Hosting
NateDogg is offline
Reply With Quote
View Public Profile
 
Old 01-16-2005, 10:41 PM
Novice Talker

Posts: 14
If I develop my site fully on HTML, and only use CSS for the style change properties, is that possible?
cool291 is offline
Reply With Quote
View Public Profile
 
Old 01-16-2005, 10:57 PM
NateDogg's Avatar
Extreme Talker

Posts: 163
Yes, but you still require JavaScript to switch the CSS stylesheets for you. Do you have a URL for us to look at??
__________________
Nathan

Become an affiliate
Web Design Web Hosting
NateDogg is offline
Reply With Quote
View Public Profile
 
Old 01-16-2005, 11:01 PM
Novice Talker

Posts: 14
yeah, i have it hidden on a free hoster, it is currently uploading, I will post the link ASAP, I have a very slow connection at the time......
cool291 is offline
Reply With Quote
View Public Profile
 
Old 01-16-2005, 11:14 PM
Novice Talker

Posts: 14
http://cooly291.freesuperhost.com/test/

The one I was working on wouldn't upload, but I have this, and an exact copy of it in green, thats the second style to choose from. It is in all HTML. I need to knwo what folders to make and what files etc. to make!
cool291 is offline
Reply With Quote
View Public Profile
 
Old 01-17-2005, 12:01 AM
NateDogg's Avatar
Extreme Talker

Posts: 163
I'll walk you through the process.

1) Make your HTML.
2) Make your CSS styles
3) Edit your HTML file to include the above JavaScript
4) Make certain that you've edited the JavaScript to link to your CSS files
5) Test and debug

I think I've got everything. So all you need is your HTML file, and at least two CSS files.
__________________
Nathan

Become an affiliate
Web Design Web Hosting
NateDogg is offline
Reply With Quote
View Public Profile
 
Old 01-17-2005, 12:33 AM
Novice Talker

Posts: 14
ok, thanks a lot, I am tweaking my 3 (so far), templates now and gearing up to upload them, I will be back to ask questions/report later on. THanks a lot, a real lot!!

Last edited by cool291 : 01-21-2005 at 05:37 PM.
cool291 is offline
Reply With Quote
View Public Profile
 
Old 01-21-2005, 05:34 PM
Novice Talker

Posts: 14
Am I to put the "persistant.css" in the place i want it to show? Like, I want my navibar to be persistant, so I only change that one css and it changes on every page, so so I put:

<link rel="stylesheet"
type="text/css" href="navibar.css" />

where I want it to appear?

Last edited by cool291 : 01-21-2005 at 05:38 PM.
cool291 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Major help, CSS or what?
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.17951 seconds with 13 queries