Forum Moderators: open
I have a problem that all pages using this CMS looks ok in IE but not in Firefox.
As you see in the code in header.asp there is something like - align="<%= rsStyle(19) %> -
That must keep the solution but i do not know what it is or where it is defined.
Any idears where to start
I also show a part of a code in headtemp.asp about identifying the browser.
I have added the lines about Firefox and not sure if it is right.
Does anyone have any idea where i go from here to get it resolved?
See codes from my page that might be relevant:
-----------------------------------------------------------
Code for header.asp:
-----------------------------------------------------------
<div id="MenuBar">
<table border="0" width="100%" bgcolor="<%= rsMenuStyle(1) %>" cellspacing="0" cellpadding="0" height="81">
<tr>
<td width="100%" align="<%= rsStyle(19) %>" valign="top"><div align="<%= rsStyle(19) %><a href="default.asp"><img border="0" src="Files/Banner.jpg"></a></div></td>
</tr>
</table>
</div>
-----------------------------------------------------------
Code for headtemp.asp:
-----------------------------------------------------------
/*****************************************************************************
Default browsercheck
******************************************************************************/
function lib_bwcheck(){ //Browsercheck (needed)
this.ver=navigator.appVersion
this.agent=navigator.userAgent
this.dom=document.getElementById?1:0
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0;
this.ie=this.ie4¦¦this.ie5¦¦this.ie6
this.firefox = this.agent.indexOf("Firefox")>-1
this.mac=this.agent.indexOf("Mac")>-1
this.opera5=this.agent.indexOf("Opera 5")>-1
this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie6 ¦¦ this.ie5 ¦¦ this.ie4 ¦¦ this.firefox ¦¦ this.ns4 ¦¦ this.ns6 ¦¦ this.opera5 ¦¦ this.dom)
return this
}
var bw=new lib_bwcheck()
mDebugging=1 //Set to 0 for NO Debugging, set to 1 for alert debugging and set to 2 for status.
[edited by: tedster at 11:01 pm (utc) on Mar. 28, 2009]
[edit reason] removed personal URL [/edit]
I strongly doubt that the browsercheck library is the issue here. This kind of library is usually related to javascript funtionality, not basic page layout.
align="<%= rsStyle(19) %> -
That must keep the solution but i do not know what it is or where it is defined.
It sounds like this is going to be specific to your CMS - rather than something general to ASO or HTML. You could code the alignment rules directly, and there is a good reason that you might want to. The align attribute for a div was deprecated as of HTML 4! Most browsers still support it - but it's not really a good idea.
So I'd say your better off to use css for alignment and abandon whatever is being "forced" on you through the CMS. If that seems like a problem, then check the Help or Support files for your particular CMS to discover where they put the controls for you.
The page used for user to select layout is this file:
WebLayout.asp
------------------------------------------------------------
<!--#include file="../connect.inc"-->
<!--#include file="unQuote.inc"-->
<%
'Protect
if IsEmpty(Session("YouAreIn")) then
Response.Redirect "Login.asp?URL=WebLayOut.asp"
end if
if not IsEmpty(Request.Form("Submit")) Then
Conn.Execute "UPDATE tblStyle SET aLink = '" _
& Request.Form("aLink") & "', aHover = '" _
& Request.Form("aHover") & "', BodyFont = '" _
& Request.Form("BodyFont") & "', BodyFontSize = '" _
& Request.Form("BodyFontSize") & "', BodyFontColor = '" _
& Request.Form("BodyFontColor") & "' , BodybgColor = '" _
& Request.Form("BodybgColor") & "', BodyFontAlign = '" _
& Request.Form("BodyFontAlign") & "', HeadlineFont = '" _
& Request.Form("HeadlineFont") & "', H1Color = '" _
& Request.Form("H1Color") & "', H2Color = '" _
& Request.Form("H2Color") & "', H3Color = '" _
& Request.Form("H3Color") & "', H4Color = '" _
& Request.Form("H4Color") & "', H5Color = '" _
& Request.Form("H5Color") & "', H6Color = '" _
& Request.Form("H6Color") & "', LeftSide = '" _
& Request.Form("LeftSide") & "', TextPageBorderColor = '" _
& Request.Form("TextPageBorderColor") & "', TextPagebgColor = '" _
& Request.Form("TextPagebgColor") & "', PageWidth = '" _
& Request.Form("PageWidth") & "', PageAlign = '" _
& Request.Form("PageAlign") & "' WHERE StyleID = 1 "
Response.Redirect "WebLayOut.asp"
ELSE
set rs = Conn.Execute("SELECT * FROM tblStyle WHERE StyleID = 1")
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="stylesheet" type="text/css" href="../style.asp">
<SCRIPT LANGUAGE=JAVASCRIPT>
function ColorPicker(id) {
nytVindue = window.open(id, 'Color', 'toolbar=no,location=no,scrollbars=yes,width=700,height=470')
}
</SCRIPT>
</head>
<body topmargin="0" leftmargin="0">
<!--#include file="Head.asp"-->
<div id="Ramme">
<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
<td width="100%">
<h2 align="center"><br>
Make you basic web layout!</h2>
<form method="POST" action="WebLayOut.asp" name="Form1">
<table border="0" width="100%" cellspacing="1" cellpadding="2" bgcolor="#5E95D9">
<tr>
<td width="25%" bgcolor="#FFFFFF"> Color on link:</td>
<td width="75%" bgcolor="#FFFFFF"> <input type="text" id="aLink" name="aLink" size="20" value="<%= rs(1) %>" style="background: <%= rs(1) %>">
<a href="javascript:ColorPicker('Color.asp?Felt=aLink')">Pick Color</a></td>
</tr>
<tr>
<td width="25%" bgcolor="#FFFFFF">Color on link mouse over:</td>
<td width="75%" bgcolor="#FFFFFF"> <input type="text" id="aHover" name="aHover" size="20" value="<%= rs(2) %>" style="background: <%= rs(2) %>">
<a href="javascript:ColorPicker('Color.asp?Felt=aHover')">Pick Color</a></td>
</tr>
<tr>
<td width="25%" bgcolor="#FFFFFF">Bg Color outside frame:</td>
<td width="75%" bgcolor="#FFFFFF"> <input type="text" id="BodybgColor" name="BodybgColor" size="20" value="<%= rs(6) %>" style="background: <%= rs(6) %>">
<a href="javascript:ColorPicker('Color.asp?Felt=BodybgColor')">Pick Color</a></td>
</tr>
<tr>
<td width="25%" bgcolor="#FFFFFF">Border color outside frame</td>
<td width="75%" bgcolor="#FFFFFF"> <input type="text" id="TextPageBorderColor" name="TextPageBorderColor" size="20" value="<%= rs(17) %>" style="background: <%= rs(17) %>">
<a href="javascript:ColorPicker('Color.asp?Felt=TextPageBorderColor')">Pick Color</a>
</td>
</tr>
<tr>
<td width="25%" bgcolor="#FFFFFF">Bg Color on all pages:</td>
<td width="75%" bgcolor="#FFFFFF"> <input type="text" id="TextPagebgColor" name="TextPagebgColor" size="20" value="<%= rs(16) %>" style="background: <%= rs(16) %>">
<a href="javascript:ColorPicker('Color.asp?Felt=TextPagebgColor')">Pick Color</a>
</td>
</tr>
<tr>
<td width="25%" bgcolor="#FFFFFF">Size of the whole website:</td>
<td width="75%" bgcolor="#FFFFFF"> <select size="1" name="PageWidth" id="PageWidth">
<option selected value="<%= rs(18) %>"><%= rs(18) %></option>
<option value="760">760</option>
<option value="984">984</option>
</select></td>
</tr>
<tr>
<td width="25%" bgcolor="#FFFFFF">Alignment of whole website:</td>
<td width="75%" bgcolor="#FFFFFF"> <select size="1" name="PageAlign" id="PageAlign">
<option selected value="<%= rs(19) %>"><%= rs(19) %></option>
<option value="left">Left</option>
<option value="center">Center</option>
</select></td>
</tr>
<tr>
<td width="25%" bgcolor="#FFFFFF">Text Color on all pages</td>
<td width="75%" bgcolor="#FFFFFF"> <input type="text" id="BodyFontColor" name="BodyFontColor" size="20" value="<%= rs(5) %>" style="background: <%= rs(5) %>">
<a href="javascript:ColorPicker('Color.asp?Felt=BodyFontColor')">Pick Color</a></td>
</tr>
<tr>
<td width="25%" bgcolor="#FFFFFF">Text style on all pages:</td>
<td width="75%" bgcolor="#FFFFFF"> <select size="1" name="BodyFontSize">
<option selected value="<%= rs(4) %>"><%= rs(4) %></option>
<option value="8px">8px</option>
<option value="10px">10px</option>
<option value="12px">12px</option>
<option value="14px">14px</option>
</select><select size="1" name="BodyFont">
<option selected value="<%= rs(3) %>"><%= rs(3) %></option>
<option value="Arial">Arial</option>
<option value="Arial Black" style="font-family:Arial Black">Arial
Black</option>
<option value="Arial Narrow">Arial Narrow</option>
<option value="Comic Sans MS">Comic Sans MS</option>
<option value="Courier New">Courier New</option>
<option value="System">System</option>
<option value="Tahoma">Tahoma</option>
<option value="Times New Roman">Times New Roman</option>
<option value="Verdana">Verdana</option>
<option value="Wingdings">Wingdings</option>
</select><select size="1" name="BodyFontAlign">
<option selected value="<%= rs(7) %>"><%= rs(7) %></option>
<option value="Left">Left</option>
<option value="Right">Right</option>
<option value="Center">Center</option>
<option value="Justify">Justify</option>
</select></td>
</tr>
<tr>
<td width="25%" bgcolor="#FFFFFF">Font type on Headlines:</td>
<td width="75%" bgcolor="#FFFFFF"> <select size="1" name="HeadlineFont">
<option selected value="<%= rs(8) %>"><%= rs(8) %></option>
<option value="Arial">Arial</option>
<option value="Arial Black">Arial Black</option>
<option value="Arial Narrow">Arial Narrow</option>
<option value="Comic Sans MS">Comic Sans MS</option>
<option value="Courier New">Courier New</option>
<option value="System">System</option>
<option value="Tahoma">Tahoma</option>
<option value="Times New Roman">Times New Roman</option>
<option value="Verdana">Verdana</option>
<option value="Wingdings">Wingdings</option>
</select></td>
</tr>
<tr>
<td width="25%" bgcolor="#FFFFFF">Text color on Headline 1:</td>
<td width="75%" bgcolor="#FFFFFF"> <input type="text" id="H1Color" name="H1Color" size="20" value="<%= rs(9) %>" style="background: <%= rs(9) %>">
<a href="javascript:ColorPicker('Color.asp?Felt=H1Color')">Pick Color</a></td>
</tr>
<tr>
<td width="25%" bgcolor="#FFFFFF">Text color on Headline 2:</td>
<td width="75%" bgcolor="#FFFFFF"> <input type="text" id="H2Color" name="H2Color" size="20" value="<%= rs(10) %>" style="background: <%= rs(10) %>">
<a href="javascript:ColorPicker('Color.asp?Felt=H2Color')">Pick Color</a></td>
</tr>
<tr>
<td width="25%" bgcolor="#FFFFFF">Text color on Headline 3:</td>
<td width="75%" bgcolor="#FFFFFF"> <input type="text" id="H3Color" name="H3Color" size="20" value="<%= rs(11) %>" style="background: <%= rs(11) %>">
<a href="javascript:ColorPicker('Color.asp?Felt=H3Color')">Pick Color</a></td>
</tr>
<tr>
<td width="25%" bgcolor="#FFFFFF">Text color on Headline 4:</td>
<td width="75%" bgcolor="#FFFFFF"> <input type="text" id="H4Color" name="H4Color" size="20" value="<%= rs(12) %>" style="background: <%= rs(12) %>">
<a href="javascript:ColorPicker('Color.asp?Felt=H4Color')">Pick Color</a></td>
</tr>
<tr>
<td width="25%" bgcolor="#FFFFFF">Text color on Headline 5:</td>
<td width="75%" bgcolor="#FFFFFF"> <input type="text" id="H5Color" name="H5Color" size="20" value="<%= rs(13) %>" style="background: <%= rs(13) %>">
<a href="javascript:ColorPicker('Color.asp?Felt=H5Color')">Pick Color</a></td>
</tr>
<tr>
<td width="25%" bgcolor="#FFFFFF">Text color on Headline 6:</td>
<td width="75%" bgcolor="#FFFFFF"> <input type="text" id="H6Color" name="H6Color" size="20" value="<%= rs(14) %>" style="background: <%= rs(14) %>">
<a href="javascript:ColorPicker('Color.asp?Felt=H6Color')">Pick Color</a></td>
</tr>
<tr>
<td width="25%" bgcolor="#FFFFFF">Bg color left bar:</td>
<td width="75%" bgcolor="#FFFFFF"> <input type="text" id="leftside" name="leftside" size="20" value="<%= rs(15) %>" style="background: <%= rs(15) %>">
<a href="javascript:ColorPicker('Color.asp?Felt=leftside')">Pick Color</a></td>
</tr>
<tr>
<td width="25%" bgcolor="#FFFFFF"> </td>
<td width="75%" bgcolor="#FFFFFF"><input type="submit" value="Submit" name="Submit"></td>
</tr>
</table>
</form>
<p>Normal tekst<p><a href="WebLayOut.asp">Link</a><h1>Headline 1</h1>
<h2>Headline 2</h2>
<h3>Headline 3</h3>
<h4>Headline 4</h4>
<h5>Headline 5</h5>
<h6>Headline 6
<p>
</td>
</tr>
</table>
</div>
</body>
</html>
------------------------------- END ------------------------
Another one that saw this said i should but
<br /> before the tag:
<div id="Ramme">
It did not fix it for me.
Does this file give any other clue or clue to in what file we can find the answer
Kind Regards
Morten
2. Modify the ASP script to the generate this HTML/CSS
rsStyle(19) means the 20th field in the recordset rsStyle returned by an SQL query somewhere. As Tedster says, you could hard code this part of the code if you don't need it to be set by the CMS.