Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 5th, 2011, 01:23 PM
Authorized User
Points: 187, Level: 3
Points: 187, Level: 3 Points: 187, Level: 3 Points: 187, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2011
Posts: 45
Thanks: 2
Thanked 0 Times in 0 Posts
Smile Chap 3, pg 88, #6

How can any browser show the initial css color setting of Green (#080000) on my hyperlink? Any browser I use, IE9, Firefox, Safari, Chrome all default to the Red setting.
Hover works correctly, but the only other color displayed is Red.

Even after clearing all the browser cache settings and even restarting VWD 2010, the browsers still show Red.

I have even tried overridding the forground color in Design to other initial colors without success.

Do you have an idea as to what I'm doing wrong?

I know it's something simple, but I have spent 1.5 hrs trying to resolve this little problem. Sorry to bother for such an insignificant issue.

Jack Koyle
Michigan
Reply With Quote
  #2 (permalink)  
Old December 5th, 2011, 01:33 PM
Imar's Avatar
Wrox Author
Points: 67,286, Level: 100
Points: 67,286, Level: 100 Points: 67,286, Level: 100 Points: 67,286, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,228
Thanks: 66
Thanked 1,414 Times in 1,394 Posts
Default

Hi Jack,

Can you post your code? There must be a simple explanation...

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #3 (permalink)  
Old December 5th, 2011, 01:46 PM
Authorized User
Points: 187, Level: 3
Points: 187, Level: 3 Points: 187, Level: 3 Points: 187, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2011
Posts: 45
Thanks: 2
Thanked 0 Times in 0 Posts
Smile Chap 3, pg 88, #6

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></title>

<link href="Styles/Styles.css" rel="stylesheet" type="text/css" />

<style type="text/css">
.style1
{
color: #0080FF;
}
</style>

</head>
<body>
<form id="form1" runat="server">
<div id="PageWrapper"></div>
<div id="MainContent">
<h1><a href="Default.aspx" class="style1">1-888-Referral</a></h1>
<p>A Customized Referral Service Specifically Designed for the Dental Specialist and the Referring Office.</p>
<p>You will never miss another Referral</p>
</div>
<div id="Sidebar">Sidebar Goes Here</div>
<div id="Footer">Footer Goes Here</div>

</form>
</body>
</html>



Styles/Styles.css

#Header
{
background-color: #C0C0C0;
width: 844px;
height: 175px;
}

*
{
font-family: Arial;
}

h1
{
font-size: 21px;
}

#PageWrapper
{
width: 844px;
}

#MenuWrapper
{
width: 844px;
}

#MainContent
{
width: 664px;
float: left;
}

#Sidebar
{
background-color: Gray;
width: 180px;
float: left;
}

#Footer
{
background-color: #C0C0C0;
width: 844px;
clear: both;
}

#MainContent a
{
color: #008000; /* Green */
text-decoration: underline;
}

#MainContent a:visited
{
color: #FF0000; /* Red */
text-decoration: underline;
}

#MainContent a:hover
{
color: #FFA500; /* Orange */
text-decoration: underline;
}
Reply With Quote
  #4 (permalink)  
Old December 5th, 2011, 01:57 PM
Imar's Avatar
Wrox Author
Points: 67,286, Level: 100
Points: 67,286, Level: 100 Points: 67,286, Level: 100 Points: 67,286, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,228
Thanks: 66
Thanked 1,414 Times in 1,394 Posts
Default

indeed. Take a look at this:

Code:
 
CodeFile="Default.aspx.vb
and this
Code:
 
<a href="Default.aspx" class="style1">
You run this code in a page called Default.aspx. By browsing to it, you visit it. The link will then be rendered with a:visited class according to CSS rules.

Change the link something that doesn't exist yet or that you haven't visited yet (Whatever.aspx should do the trick) and it'll work.

You may also need to remove the inline style1....

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
jkoyle (December 5th, 2011)
  #5 (permalink)  
Old December 5th, 2011, 02:10 PM
Authorized User
Points: 187, Level: 3
Points: 187, Level: 3 Points: 187, Level: 3 Points: 187, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2011
Posts: 45
Thanks: 2
Thanked 0 Times in 0 Posts
Smile Chap 3, pg 88, #6

THANK YOU:

Absolutely Perfect. I knew it was something simple.

God Bless You

Jack Koyle
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chap. 4, Pg 121-123 tompp BOOK: Beginning ASP.NET 4 : in C# and VB 6 August 26th, 2011 01:33 PM
Try it Now, Chap. 4, Pg 123 jefals BOOK: Beginning ASP.NET 4 : in C# and VB 8 May 9th, 2011 11:41 AM
BasePage (Chap 4 pg 98) NetWorld BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 1 November 25th, 2010 01:39 PM
Chap 15 pg 532 tomche BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 10 April 2nd, 2010 03:37 PM
return *this - Chap 8 pg 418 proslambano BOOK: Ivor Horton's Beginning Visual C++ 2005 0 March 10th, 2007 12:19 PM



All times are GMT -4. The time now is 03:16 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.