• 0

How to use alternative stylesheets in Chrome/Safari?


Question

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="https:///js/styleswitcher.js"></script>

Any ideas/thoughts? Thanks.

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.