I am constructing a website for a bike shop. I want users with impaired vision or disabilities to be able to change the font size on the page.
I have created two ".css" files called "default.cs s" and "huge.css" which are on my server in the "templates" folder.
On my homepage (log.asp) i have the following code to execute the change:
<p><a href="style_swi tcher.asp?style =default">Norma l Size</a>
<a href="style_swi tcher.asp?style =huge">Large Size</a>
</p>
This is the code for the file "style_switcher .asp"
<head>
<%
Dim strCurrStyle
strCurrStyle = Request.Cookies ("stylesheet ")
If strCurrStyle = "" Then
strCurrStyle = "default"
Else
Response.Cookie s("stylesheet") .Expires = Date + 30
End If
%>
<style type="text/css" media="screen">
@import url(http://wwww.mywebsite. com/extension<%= strCurrStyle %>.css);
</style>
</head>
<% Dim strNewStyle
strNewStyle = Request.QuerySt ring("style")
If Len(strNewStyle ) > 1 Then
Response.Cookie s("stylesheet ") = strNewStyle
Response.Cookie s("stylesheet") .Expires = Date + 30
End If
Response.Redire ct ("log.asp") %>
My problem is that the code executes, refreshes "log.asp" but without making any changes to the size of the text! something is missing somewhere - please help me!!!!!!!!!!!!! !!!!!!!
I have created two ".css" files called "default.cs s" and "huge.css" which are on my server in the "templates" folder.
On my homepage (log.asp) i have the following code to execute the change:
<p><a href="style_swi tcher.asp?style =default">Norma l Size</a>
<a href="style_swi tcher.asp?style =huge">Large Size</a>
</p>
This is the code for the file "style_switcher .asp"
<head>
<%
Dim strCurrStyle
strCurrStyle = Request.Cookies ("stylesheet ")
If strCurrStyle = "" Then
strCurrStyle = "default"
Else
Response.Cookie s("stylesheet") .Expires = Date + 30
End If
%>
<style type="text/css" media="screen">
@import url(http://wwww.mywebsite. com/extension<%= strCurrStyle %>.css);
</style>
</head>
<% Dim strNewStyle
strNewStyle = Request.QuerySt ring("style")
If Len(strNewStyle ) > 1 Then
Response.Cookie s("stylesheet ") = strNewStyle
Response.Cookie s("stylesheet") .Expires = Date + 30
End If
Response.Redire ct ("log.asp") %>
My problem is that the code executes, refreshes "log.asp" but without making any changes to the size of the text! something is missing somewhere - please help me!!!!!!!!!!!!! !!!!!!!
Comment