Current location: Hot Scripts Forums » Programming Languages » PHP » Graphics On and Off Link


Graphics On and Off Link

Reply
  #1 (permalink)  
Old 11-18-03, 08:21 PM
max max is offline
Newbie Coder
 
Join Date: Jul 2003
Location: Planet Krypton
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Graphics On and Off Link

I have a site wth heavy graphics and CSS styling. I kept 2 versions of html files until recently when I converted to css, so all my html files look great in plain text without css.

I want to add a link for example 'Text Version' that switches to the version without the css, and some major graphics.

Does anyone know if there is a tutorial already done? I would like to attempt a php solution. Any help is greatly appreciated.

Cheers

Last edited by max; 11-18-03 at 08:32 PM.
Reply With Quote
  #2 (permalink)  
Old 11-19-03, 03:45 AM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
why don't make another CSS and with all the changes you want then link to it
you can do that by using something like this :
Code:
<head>
<link rel="stylesheet" type="text/css" href="<?php $_GET['style']; ?>.css" />
</head>
obviusly, put this header in all your HTML pages and then pass the style you want in ALL links (this would be rough) .. and make sure that the link looks like something like this :
<a href="mypage.php?style=bloody">The Bloody Style</a>
and the CSS file name is the exact name of the style var you passed but without .CSS ..
I usualy work with internal CSS and this Idea just poped up into my head ..
hope that was helpful
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]

Last edited by NeverMind; 11-19-03 at 04:05 AM.
Reply With Quote
  #3 (permalink)  
Old 11-21-03, 04:36 AM
Stefan's Avatar
Stefan Stefan is offline
Junior Code Guru
 
Join Date: Jun 2003
Location: Utrecht, The Netherlands
Posts: 599
Thanks: 0
Thanked 0 Times in 0 Posts
another way to do this is by using javascript. with a not too hard javascript, you can switch stylesheets on the fly, without even reloading the page.
Reply With Quote
  #4 (permalink)  
Old 11-21-03, 08:15 PM
max max is offline
Newbie Coder
 
Join Date: Jul 2003
Location: Planet Krypton
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
That's the thing. I've done the javascript, but I really would rather do it server side.

Thanks anyways.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Forum Jump


All times are GMT -5. The time now is 05:52 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.