Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Colour of Hyperlinks

Status
Not open for further replies.

kaycee79

Technical User
Jan 10, 2004
82
GB


Hello, i am creating hyperlinks on the page below, and for some reason, they are coming out in red, and not the conventional blue
that i want. (Sorry about the code be in such a mess!)

Can anyone explain why this is the case?

Thanks in advance

Code:
<%
	If Session(&quot;Username&quot;) = &quot;&quot; Then
		Response.Redirect &quot;Login.asp&quot;
	End If
%>


<HTML>
<HEAD>
<TITLE>Add an Event</TITLE>
</HEAD>
<STYLE>
TD.cal { font-family:arial; font-size: 8pt; }
TD.calmonth { font-family:arial; font-size: 8pt; text-align: right;}
TD.caltoday { font-family:arial; font-size: 8pt; text-align: right; color: white; background-color:#C0C0C0; border-width:1; 

border-type:solid; border-color:#800000; }
A.textlink { font-family:arial; font-size: 8pt; height: 20px; color: black; }
.disabledtextlink { font-family:arial; font-size: 8pt; height: 20px; color: #808080; }
A.cal { text-decoration:none; color:#000000; }
A.calthismonth { text-decoration:none; color:#000000; }
A.calothermonth { text-decoration:none; color:#808080; }
.calnotclickable { color:#808080; }
A { COLOR: #cc0000; TEXT-DECORATION: none }
    A:hover { TEXT-DECORATION: underline }
    .style1 { FONT-WEIGHT: bold; FONT-SIZE: 10pt }
    .style2 { COLOR: #ff8000 }
    .style6 { FONT-SIZE: 8pt }
    .style7 {color: #FF8000}
</STYLE>
<script src=&quot;calendar/AnchorPosition.js&quot;>
</script>
<script src=&quot;calendar/CalendarPopup.js&quot;>
</script>
<script src=&quot;calendar/PopupWindow.js&quot;>
</script>
<script src=&quot;calendar/functions.js&quot;>
</script>
<div name=&quot;calendar&quot; id=&quot;calendar&quot; style=&quot;LEFT: 0px; POSITION: absolute; TOP: 0px; background-color:#DDDDDD&quot;></div>
<script>
var cal = new CalendarPopup('calendar'); 
cal.offsetX = 20;
cal.offsetY = 0;
cal.showYearNavigation(); 
function txtDate_fct(y,m,d)
{
    document.all.txtDate.value=(d>9?d:&quot;0&quot;+d)+&quot;/&quot;+(m>9?m:&quot;0&quot;+m)+&quot;/&quot;+y
}
</script>





<BODY>
<body bgcolor=&quot;#99CCFF&quot;>
<div id=&quot;content&quot;>
<font face=&quot;Arial&quot;>
<input type=&quot;button&quot; onClick=&quot;document.all.content.style.zoom=(document.all.content.style.zoom==1?2:1);&quot; value=&quot;Change Font Size&quot;><br>
</font>
<p align=&quot;center&quot;><u><b><font size=&quot;7&quot; face=&quot;Arial&quot;>Add an Event </font></b></u></p>
<p align=&quot;center&quot;><font face=&quot;Arial&quot;><a href=&quot;RegisteredUsersHome.asp&quot;>Home</a>&nbsp;&nbsp;&nbsp;
<a href=&quot;DiscussionBoard.asp&quot;>Discussion</a>&nbsp;&nbsp;&nbsp;
<a href=&quot;Feedback.asp&quot;>Feedback</a>&nbsp;&nbsp;&nbsp; <a href=&quot;Donations.asp&quot;>
Donation</a>&nbsp;&nbsp;&nbsp; <a href=&quot;NewsLetter.asp&quot;>Newsletter</a>&nbsp;&nbsp;&nbsp;
<a href=&quot;../sitemap.asp&quot;>Site Map</a>&nbsp;&nbsp;&nbsp; <a href=&quot;AboutUs.asp&quot;>
About Us</a>&nbsp;&nbsp;&nbsp; <a href=&quot;Links.asp&quot;>Other Links</a></font></p>
<p align=&quot;center&quot;><font face=&quot;Arial&quot;><a href=&quot;Events.asp&quot;>Forthcoming Events</a>&nbsp;&nbsp;&nbsp;
<a href=&quot;PastEvents.asp&quot;>Past Events</a>&nbsp;&nbsp;&nbsp;
<a href=&quot;EventReport.asp&quot;>Event Report</a>&nbsp;&nbsp;&nbsp;
<a href=&quot;EventSearch.asp&quot;>Event Search</a></font></p>
<p><font face=&quot;Arial&quot;><BR>
As a registered user, you have the privilege of being able to organise your own events.<br>
Before organising an Event, please read our <a href=&quot;termsandconditions.asp#Events&quot;>Terms and Conditions</a>
</font></p>


<FORM ACTION = &quot;addeventtodb.asp&quot; METHOD= &quot;post&quot; >

    <font face=&quot;Arial&quot;>Event Name  <input type=&quot;text&quot; name= &quot;txtEventName&quot; size=&quot;20&quot;><BR>
    Date             <input type=&quot;text&quot; name = &quot;txtDate&quot; size=&quot;20&quot; readonly><A 

onclick=&quot;cal.setReturnFunction('txtDate_fct');cal.showCalendar('anchor1');return false;&quot; href=&quot;#&quot; name=anchor1 id=anchor1><IMG 

height=28 src=&quot;calendar/calendar.gif&quot; width=43 border=0></a> (calander)<BR>
    Time             <input type=&quot;text&quot; name = &quot;txtTime&quot; size=&quot;20&quot;>                 enter in the format timePM<BR>
    Location       <input type=&quot;text&quot; name = &quot;txtLocation&quot; size=&quot;20&quot;><BR>
    Details          
    <textarea name=&quot;txtDetails&quot; col=&quot;40&quot;  rows=&quot;3&quot; wrap=&quot;virtual&quot; cols=&quot;20&quot;></textarea> <BR>
    Other Info     
    <textarea name=&quot;txtInfo&quot; col=&quot;40&quot;  rows=&quot;3&quot; wrap=&quot;virtual&quot; cols=&quot;20&quot;></textarea> <BR>
    Username     <input type=&quot;text&quot; name = &quot;txtUsername&quot; size=&quot;20&quot;><BR>

<INPUT TYPE=&quot;SUBMIT&quot; VALUE=&quot;Submit&quot;>
<INPUT TYPE=&quot;RESET&quot; VALUE=&quot;Clear&quot;></font></form>
</body>
</html>
 
Of course they are - you have a style sheet that is changing the colour to red...

If you change the line in your CSS that says:

Code:
A { COLOR: #cc0000; TEXT-DECORATION: none }

To read:

Code:
A { COLOR: #0000FF; TEXT-DECORATION: none }

Then the links will appear in the blue.

Hope this helps,

Dan



 
thanks for that, they are now blue, but another question, they are not underlined like other links, why is that?
 

*sigh*

Change the line to:

Code:
A { COLOR: #0000FF; }

And you will see the underline.

Why did you add the stylesheet in the first place if you didn't want all the formatting effects?

Dan
 
thanks for that, i copied and adapted the code from a site, and i did not know that this would happen. Thanks for your help though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top