rg22
06-30-2008, 05:00 PM
Hi,
I'm new to web design and have been working on the design of this page for a few days but am having trouble with the horizontal menu. It works fine but in Firefox if you reclick the 'Home' link several times, about half the time the last two links in the menu disappear, and sometimes just the last link disappears. I'm not sure what's causing this to happen, as it normally (possibly all the time) loads fine when you load the page for the first time, it's just when you reclick it. Also, this doesn't happen in IE.
Here's the page:
http://rgtest.awardspace.com/
I'd guess the problem lies somewhere in the code I've written for the 'ACROSS MENU' part of the CSS or html.
If there's any other errors you spot let me know
Thanks
HTML code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy for Linux (vers 1 September 2005), see www.w3.org">
<meta name="keywords" content="rgtest">
<meta name="description" content="rgtest">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" href="http://rgtest.awardspace.com/favicon.ico">
<link rel="stylesheet" type="text/css" href="http://rgtest.awardspace.com/ri22ard.css">
<title>rgtest : Home</title>
</head>
<body>
<div id="body">
<!-- RI22ARD -->
<div id="ri22ard">
<img src="http://rgtest.awardspace.com/topcornerleft.png"><img src="http://rgtest.awardspace.com/ri22ard.png">
</div>
<!-- ACROSS MENU -->
<div id="navbar">
<ul class="navbar">
<li></li>
<li><a href="index.php" class="navlink"
onmouseover="document.index.src='http://rgtest.awardspace.com/herminered.png'"
onmouseout="document.index.src='http://rgtest.awardspace.com/hermine.png'">
<img src="http://rgtest.awardspace.com/hermine.png" name="index" id="hermine">
Home</a></li>
<li><a href="index.php"
onmouseover="document.muco.src='http://rgtest.awardspace.com/herminered.png'"
onmouseout="document.muco.src='http://rgtest.awardspace.com/hermine.png'">
<img src="http://rgtest.awardspace.com/hermine.png" name="muco" id="hermine">
BBBBBBB</a></li>
<li><a href="index.php"
onmouseover="document.c.src='http://rgtest.awardspace.com/herminered.png'"
onmouseout="document.c.src='http://rgtest.awardspace.com/hermine.png'">
<img src="http://rgtest.awardspace.com/hermine.png" name="c" id="hermine">
CCCCCCCCC</a></li>
<li><a href="index.php"
onmouseover="document.d.src='http://rgtest.awardspace.com/herminered.png'"
onmouseout="document.d.src='http://rgtest.awardspace.com/hermine.png'">
<img src="http://rgtest.awardspace.com/hermine.png" name="d" id="hermine">
DDDDDDD</a></li>
</ul>
</div>
<!-- MAIN CONTENT -->
<div id="maincontent">
<div id="maintext">
<h1>rgtest : Home</h1>
<p>Test page</p>
</div>
</div>
<!-- BOTTOMCURVE -->
<div id="bottomcurve">
<img src="http://rgtest.awardspace.com/bottomcurve.png">
</div>
<!-- ADDRESS -->
</div>
<!-- LANGUAGE MENU -->
<div id="language">
<img class="langtop" src="http://rgtest.awardspace.com/langtop.png">
<ul class="lang">
<li><a href="http://rgtest.awardspace.com/en/"><img class="langflag" src="http://rgtest.awardspace.com/english.png"></a>
<li><a href="http://rgtest.awardspace.com/fr/"><img class="langflag" src="http://rgtest.awardspace.com/francais.png"></a>
<li><a href="http://rgtest.awardspace.com/es/"><img class="langflag" src="http://rgtest.awardspace.com/espanol.png"></a>
<li><a href="http://rgtest.awardspace.com/pt/"><img class="langflag" src="http://rgtest.awardspace.com/portugues.png"></a>
</ul>
<img class="langbottom" src="http://rgtest.awardspace.com/langbottom.png">
</div>
</body>
</html>
CSS Style sheet:
body {
position: absolute;
top: 20px;
left: 30px;
padding-left: 0px;
font-family: 'trebuchet ms', sans-serif;
font-size: 16px;
color: #223311;
background-color: #aa0000;
}
#body {
width: 720px;
float:left;
}
/* ******************************** */
/* ***** RI22ARD ***** */
#ri22ard {
background: #ffffff;
margin: 0px;
border: 0px;
width: 720px;
height: 176px;
text-align: left;
padding: 0px;
float: left;
}
/* ***** ACROSS MENU ***** */
#navbar {
background: #44bb22;
margin: 0px;
border: 0px;
width: 720px;
height: 80px;
text-align: left;
padding: 0px;
float: left;
white-space: nowrap;
}
#navbar li {
display: inline;
}
ul.navbar {
list-style-type: none;
border-top: 10px solid #44bb22;
padding: 0px;
margin: 0px;
top: 0px;
display: table;
width: 100%;
line-height: 60px;
}
ul.navbar li {
background: #44bb22;
margin: 0px 0;
padding: 0px;
border-left: 30px solid #44bb22;
}
#navbar a {
color: #111111;
text-decoration: none;
font-size: 20px;
}
#navbar a:link {
color: #111111;
text-decoration: none;
font-size: 20px;
}
#navbar a:hover {
color: #ffffff;
text-decoration: none;
font-size: 20px;
}
#hermine {
vertical-align: middle;
padding: 0px;
}
/* ***** MAIN CONTENT ***** */
#maincontent {
background: #44bb22;
margin: 0px;
border: 0px;
width: 720px;
text-align: left;
padding: 0px;
float: left;
}
#maintext {
background: #66dd55;
margin-left: 20px;
margin-top: 0px;
border: 0px;
width: 670px;
height:auto;
text-align: left;
padding: 5px;
float: left;
display: block;
}
h1 {
font-family: Helvetica, Geneva, Arial,
SunSans-Regular, sans-serif;
margin: 0px;
}
I'm new to web design and have been working on the design of this page for a few days but am having trouble with the horizontal menu. It works fine but in Firefox if you reclick the 'Home' link several times, about half the time the last two links in the menu disappear, and sometimes just the last link disappears. I'm not sure what's causing this to happen, as it normally (possibly all the time) loads fine when you load the page for the first time, it's just when you reclick it. Also, this doesn't happen in IE.
Here's the page:
http://rgtest.awardspace.com/
I'd guess the problem lies somewhere in the code I've written for the 'ACROSS MENU' part of the CSS or html.
If there's any other errors you spot let me know
Thanks
HTML code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy for Linux (vers 1 September 2005), see www.w3.org">
<meta name="keywords" content="rgtest">
<meta name="description" content="rgtest">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" href="http://rgtest.awardspace.com/favicon.ico">
<link rel="stylesheet" type="text/css" href="http://rgtest.awardspace.com/ri22ard.css">
<title>rgtest : Home</title>
</head>
<body>
<div id="body">
<!-- RI22ARD -->
<div id="ri22ard">
<img src="http://rgtest.awardspace.com/topcornerleft.png"><img src="http://rgtest.awardspace.com/ri22ard.png">
</div>
<!-- ACROSS MENU -->
<div id="navbar">
<ul class="navbar">
<li></li>
<li><a href="index.php" class="navlink"
onmouseover="document.index.src='http://rgtest.awardspace.com/herminered.png'"
onmouseout="document.index.src='http://rgtest.awardspace.com/hermine.png'">
<img src="http://rgtest.awardspace.com/hermine.png" name="index" id="hermine">
Home</a></li>
<li><a href="index.php"
onmouseover="document.muco.src='http://rgtest.awardspace.com/herminered.png'"
onmouseout="document.muco.src='http://rgtest.awardspace.com/hermine.png'">
<img src="http://rgtest.awardspace.com/hermine.png" name="muco" id="hermine">
BBBBBBB</a></li>
<li><a href="index.php"
onmouseover="document.c.src='http://rgtest.awardspace.com/herminered.png'"
onmouseout="document.c.src='http://rgtest.awardspace.com/hermine.png'">
<img src="http://rgtest.awardspace.com/hermine.png" name="c" id="hermine">
CCCCCCCCC</a></li>
<li><a href="index.php"
onmouseover="document.d.src='http://rgtest.awardspace.com/herminered.png'"
onmouseout="document.d.src='http://rgtest.awardspace.com/hermine.png'">
<img src="http://rgtest.awardspace.com/hermine.png" name="d" id="hermine">
DDDDDDD</a></li>
</ul>
</div>
<!-- MAIN CONTENT -->
<div id="maincontent">
<div id="maintext">
<h1>rgtest : Home</h1>
<p>Test page</p>
</div>
</div>
<!-- BOTTOMCURVE -->
<div id="bottomcurve">
<img src="http://rgtest.awardspace.com/bottomcurve.png">
</div>
<!-- ADDRESS -->
</div>
<!-- LANGUAGE MENU -->
<div id="language">
<img class="langtop" src="http://rgtest.awardspace.com/langtop.png">
<ul class="lang">
<li><a href="http://rgtest.awardspace.com/en/"><img class="langflag" src="http://rgtest.awardspace.com/english.png"></a>
<li><a href="http://rgtest.awardspace.com/fr/"><img class="langflag" src="http://rgtest.awardspace.com/francais.png"></a>
<li><a href="http://rgtest.awardspace.com/es/"><img class="langflag" src="http://rgtest.awardspace.com/espanol.png"></a>
<li><a href="http://rgtest.awardspace.com/pt/"><img class="langflag" src="http://rgtest.awardspace.com/portugues.png"></a>
</ul>
<img class="langbottom" src="http://rgtest.awardspace.com/langbottom.png">
</div>
</body>
</html>
CSS Style sheet:
body {
position: absolute;
top: 20px;
left: 30px;
padding-left: 0px;
font-family: 'trebuchet ms', sans-serif;
font-size: 16px;
color: #223311;
background-color: #aa0000;
}
#body {
width: 720px;
float:left;
}
/* ******************************** */
/* ***** RI22ARD ***** */
#ri22ard {
background: #ffffff;
margin: 0px;
border: 0px;
width: 720px;
height: 176px;
text-align: left;
padding: 0px;
float: left;
}
/* ***** ACROSS MENU ***** */
#navbar {
background: #44bb22;
margin: 0px;
border: 0px;
width: 720px;
height: 80px;
text-align: left;
padding: 0px;
float: left;
white-space: nowrap;
}
#navbar li {
display: inline;
}
ul.navbar {
list-style-type: none;
border-top: 10px solid #44bb22;
padding: 0px;
margin: 0px;
top: 0px;
display: table;
width: 100%;
line-height: 60px;
}
ul.navbar li {
background: #44bb22;
margin: 0px 0;
padding: 0px;
border-left: 30px solid #44bb22;
}
#navbar a {
color: #111111;
text-decoration: none;
font-size: 20px;
}
#navbar a:link {
color: #111111;
text-decoration: none;
font-size: 20px;
}
#navbar a:hover {
color: #ffffff;
text-decoration: none;
font-size: 20px;
}
#hermine {
vertical-align: middle;
padding: 0px;
}
/* ***** MAIN CONTENT ***** */
#maincontent {
background: #44bb22;
margin: 0px;
border: 0px;
width: 720px;
text-align: left;
padding: 0px;
float: left;
}
#maintext {
background: #66dd55;
margin-left: 20px;
margin-top: 0px;
border: 0px;
width: 670px;
height:auto;
text-align: left;
padding: 5px;
float: left;
display: block;
}
h1 {
font-family: Helvetica, Geneva, Arial,
SunSans-Regular, sans-serif;
margin: 0px;
}