I was into chapter 4 but went back to chapter 3 due to noticing some problems with my a:visited links. The reaction works differently depending on the browsers I use. I cleared caches and delete the history but it makes no difference.
Browsers:
Firefox 2.0.0.13
IE 7.05730.13
Netscape 8.0.2
StyleSheet.css
#header
{
background-color: #C0C0C0;
width: 844px;
height: 33px;
}
*
{
font-family: Arial, Helvetica, sans-serif;
}
h1
{
font-size: 20px;
}
#pageWrapper
{
width: 844px;
}
#mainContent
{
width: 644px;
float: left;
}
#sideBar
{
background-color: #C0C0C0;
width: 200px;
float: left;
}
#footer
{
background-color: #C0C0C0;
width: 844px;
clear: both;
}
#mainContent a
{
color: #008000;
text-decoration: underline;
}
#mainContent a:visited
{
color: #FF0000;
text-decoration: underline;
}
#mainContent a:hover
{
color: #FFA500;
text-decoration: underline;
}
Default.aspx
<%@ Page Language="
VB" AutoEventWireup="false" CodeFile="Default.aspx.
vb" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
.style1
{
color: #FF9900;
}
</style>
<link href="Styles/StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div id="pageWrapper">
<div id="header">Header Goes Here</div>
<div id="menuWrapper">Menu Goes Here</div>
<div id="mainContent">
<h1>Hi there visitor and welcome to Planet Wrox</h1>
<p>We are glad you#39;re <span class="style1">paying a visit</span> to <a href="http://www.PlanetWrox.com">www.PlanetWrox.com</a>, the coolest music community site on the Inernet.</p>
<p>Feel free to have a <a href="Default.aspx">look around</a>, and there are lots of interesting <b>reviews
and concert pictures</b> to be found here.</p>
</div>
<div id="sideBar">Sidebar goes here</div>
<div id="footer">Footer goes here</div>
</div>
</form>
</body>
</html>
Problems:
Firefox - a:visited doesn't work not matter what I do.
IE - works only when I press cntr-F5 or open IE from my desktop and paste the link in, but it doesn't work when I hit the View in Browser icon - It ignores (a) in the second link (look around) and only recognizes the a:visited and a:hover.
Netscape - the second link always ignores (a) - it's green on the first link but always red on the second, even when I open it and paste the link in.
:(
Remember, all caches and page history has been removed.