I'm trying to change the font size with javascript. I put some javascript in my skin and also two links you can click on to change the font. In my javascript I say that all my text in div containers can be altered. Unfortunately, only my footer changes font, and nothinbg else. Can someone help me? The code of my skin is this:
<%@ Control Language="vb" AutoEventWireup="false"
Explicit="True" Inherits="DotNetNuke.UI.Skins.Skin" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register TagPrefix="dnn" TagName="LOGO" Src="~/Admin/Skins/Logo.ascx" %>
<%@ Register TagPrefix="dnn" TagName="LOGIN" Src="~/Admin/Skins/Login.ascx" %>
<%@ Register TagPrefix="dnn" TagName="USER" Src="~/Admin/Skins/User.ascx" %>
<%@ Register TagPrefix="dnn" TagName="LANGUAGE" Src="~/Admin/Skins/Language.ascx" %>
<%@ Register TagPrefix="dnn" TagName="MENU" Src="~/Admin/Skins/SolPartMenu.ascx" %>
<%@ Register TagPrefix="dnn" TagName="SEARCH" Src="~/Admin/Skins/Search.ascx" %>
<%@ Register TagPrefix="dnn" TagName="COPYRIGHT" Src="~/Admin/Skins/Copyright.ascx" %>
<%@ Register TagPrefix="dnn" TagName="BREADCRUMB" Src="~/DesktopModules/effority.Ealo.BreadCrumb/effority_Ealo_BreadCrumb.ascx" %>
<%@ Register TagPrefix="dnn" TagName="RADTABSTRIP" Src="~/DesktopModules/Telerik.SkinObjects/RadTabstrip.ascx" %>
<%@ Register TagPrefix="dnn" TagName="RADPANELBAR" Src="~/DesktopModules/Telerik.SkinObjects/RadPanelbar.ascx" %>
<script type="text/javascript" language="javascript">
var min=8;
var max=16;
function increaseFontSize() {
var p = document.getElementsByTagName('div');
for(i=0;i<p.length;i++) {
if(p[i].style.fontSize) {
var s = parseInt(p[i].style.fontSize.replace("px",""));
} else {
var s = 11;
}
if(s!=max) {
s += 1;
}
p[i].style.fontSize = s+"px"
}
}
function decreaseFontSize() {
var p = document.getElementsByTagName('div');
for(i=0;i<p.length;i++) {
if(p[i].style.fontSize) {
var s = parseInt(p[i].style.fontSize.replace("px",""));
} else {
var s = 11;
}
if(s!=min) {
s -= 1;
}
p[i].style.fontSize = s+"px"
}
}
</script>
<div id="backgroundSmall">
<div id="large">
<table cellpadding="0" cellspacing="0" width="100%">
<tr id="smallheader">
<td>
<ul id="availableLanguages" CssClass="fontClass">
<dnn:LANGUAGE ID="LANGUAGE1" runat="server" ShowMenu="False" ShowLinks="True" />
</ul>
<ul id="bannerLinks" class="fontClass">
<li><asp:HyperLink id="HyperLink2" Text="CONTACT" NavigateUrl='~/Contact.aspx' runat="server" /></li>
<li><asp:HyperLink id="HyperLink1" Text="HOME" NavigateUrl='~/' runat="server" /></li>
</ul>
<dnn:LOGO ID="LOGO1" runat="server" />
</td>
</tr>
<tr>
<td id="content">
<div id="test">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3" id="leftRightPaddingMenu">
<dnn:RADTABSTRIP ID="RadTabStrip1" Width="100%" runat="server" MaxLevel="1" Skin="BDB" />
</td>
</tr>
<tr>
<td id="leftPadding" style="padding-top: 5px;">
<dnn:BREADCRUMB runat="server" Separator=" › " RootLevel="0" ID="broodkruimel" CssClass="fontClass" />
</td>
<td align="right">
<a href=" decreaseFontSize();">-</a>
<a href=" increaseFontSize();">+</a>
</td>
<td align="right" id="rightPadding">
<dnn:LOGIN runat="server" ID="dnnLOGIN" />
</td>
</tr>
</table>
</div>
<div id="xsnazzy">
<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
<div class="xboxcontent">
<table cellpadding="0" cellspacing="0">
<tr>
<td id="TopPane" runat="server" colspan="3" valign="top" align="center" class="toppane">
</td>
</tr>
<tr valign="top">
<td class="leftpane" runat="server" id="Leftpane" valign="top" align="left">
<dnn:RADPANELBAR ID="RadPanelBar1" runat="server" ShowOnlyCurrent="MenuLevel:2"
Skin="BDB" Width="170px" />
</td>
<td class="contentpane" runat="server" id="Contentpane" valign="top" align="left">
</td>
<td class="rightpane" runat="server" id="Rightpane" valign="top" align="center">
</td>
</tr>
<tr>
<td class="bottom" id="Bottompane" colspan="3" valign="top" align="center">
</td>
</tr>
</table>
</div>
<b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"></b></b>
</div>
</td>
</tr>
<tr>
<td>
<div id="footer">
<dnn:COPYRIGHT runat="server" ID="COPYRIGHT1" />
<asp:HyperLink id="hlSitemap" Text="Sitemap" NavigateUrl='~/Sitemap.aspx' runat="server" />
<asp:HyperLink id="hlWebmaster" Text="Webmaster" NavigateUrl='~/ContactF.aspx' runat="server" />
</div>
</td>
</tr>
</table>
</div>
</div>