• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

  • 0
Sign in to follow this  

How to use alternative stylesheets in Chrome/Safari?

Question

celticpride678    11

Hello. I'm currently working on a redesign of my website. Part of the redesign will allow users to choose what font they want to use on the site, similarly to Neowin. The code I'm using is below and it works fine in Firefox. However, in Safari and Chrome, the font does not change.

Style Chooser code:

    <select style="margin-top:19px">
  <option onclick="setActiveStyleSheet('default'); return false;">Arial/Helvetica</option>
  <option onclick="setActiveStyleSheet('alternate 1'); return false;">Tahoma</option>
  <option onclick="setActiveStyleSheet('alternate 2'); return false;">Segoe UI</option>
  <option onclick="setActiveStyleSheet('alternate 3'); return false;">Georgia</option>

</select>

Code in header:

	<link rel="stylesheet" type="text/css" href="http:///css/helvetica.css" />
	<link rel="alternate stylesheet" type="text/css" href="http:///css/tahoma.css" title="alternate 1" />
	<link rel="alternate stylesheet" type="text/css" href="http:///css/segoe.css" title="alternate 2" />
	<link rel="alternate stylesheet" type="text/css" href="http:///css/georgia.css" title="alternate 3" />
	<script src="http:///js/styleswitcher.js"></script>

Any ideas/thoughts? Thanks.

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.