Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Can Someone please assist me with the following problem, I am currently working on a project which consists of C#, Html, Css, Javascript and ASP.NET, I am having a problem with setting the focus for all of the Anchor Tags, I would really be honoured if anyone can help with me with this problem, I've tried solving it since LAST WEEK and no solution seems to be helping.

Here's how my Site.Master source code looks

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Site.master.cs" Inherits="SiteMaster" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head runat="server">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0" />
<title></title>
<link rel="stylesheet" href="Styles/jquery.maximage.css?v=1.2" type="text/css" media="screen" charset="utf-8" />
<link href="Styles/demo.css" rel="stylesheet" type="text/css">
<link href='http://fonts.googleapis.com/css family=Raleway:400,900,800,700,600,500,300,200,100' rel='stylesheet' type='text/css' />
<link rel="stylesheet" href="Styles/style.css" type="text/css" media="all" />
<script src="Scripts/jquery-1.8.0.min.js" type="text/javascript"></script>
<script type="text/javascript" src="Scripts/sliderengine/amazingslider.js"></script>
<script type="text/javascript" src="Scripts/sliderengine/initslider-1.js"></script>

<!--Javascript for the background image -->
<script src="Scripts/background/jquery.cycle.all.js" type="text/javascript" charset="utf-8"></script>
<script src="Scripts/background/jquery.maximage.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function () {
// Trigger maximage
jQuery('#maximage').maximage();
});
</script>
<script src="Scripts/functions.js" type="text/javascript"></script>
<!--[if lt IE 7]>
<script src="js/modernizr.custom.js"></script>
<![endif]-->
<script type="text/javascript">
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date(); a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a,m)})(window, document, 'script', '//www.google analytics.com/analytics.js', 'ga');

ga('create', 'UA-41915362-2', 'hospicewitwatersrand.org.za');
ga('send', 'pageview');

</script>

<asp:ContentPlaceHolder ID="HeadContent" runat="server">

<style type="text/css">
.style1
{
height: 123px;
width: 80%;
padding-top:50px;
padding-left: 20px;
padding-right: 0px;
margin-top:-20px;
margin-right: 20px;
margin-left: 57px;
}
.credit
{
height: 65px;
width: 10%;
z-index:999;
padding-top:3%;
margin-top:-10%;
padding-left:17%;
padding-right: 5%;
margin-right: -12%;
margin-left: 1%;
}

.eft
{
height: 65px;
width: 10%;
z-index:999;
padding-top:1%;
margin-top:-10.3%;
padding-left:2%;
padding-right: 5%;
margin-right: -12%;
margin-left: 6%;
}

#facebook
{
background-image: url(Images/facebook.png);
display: block;
/* margin: 0 auto;
text-indent: -9999px;*/
float:right;
padding-left:3%;
padding-top:2%;
padding-right:0%;
margin-right:4%;
margin-left:-8%;
margin-top:0%;
width: 0%;
height: 9px;
}
#twitter
{
background-image: url(Images/twitter.png);
display: block;
/* margin: 0 auto;
text-indent: -9999px;*/
float:right;
padding-left:18px;
padding-top:2%;
padding-right:1%;
margin-right:0%;
margin-left:0%;
margin-top:0%;
width: 0%;
height: 6px;
}
#linkedIn
{
background-image: url(Images/in.png);
display: block;
/* margin: 0 auto;
text-indent: -9999px;*/
float:right;
padding-left:18px;
padding-top:2%;
padding-right:0%;
margin-right:5%;
margin-left:2%;
margin-top:0%;
width: 1%;
height: 6px;
}
#youtube
{
background-image: url(Images/YouTube.png);
display: block;
/* margin: 0 auto;
text-indent: -9999px;*/
float:right;
padding-left:18px;
padding-top:2%;
padding-right:1%;
margin-right:0%;
margin-left:0%;
margin-top:0%;
width: 0%;
height: 6px;
}
</style>
</head>
<body>
<form runat="server">
<!--this contains the background pattern -->

<!--These are the images for the background -->

<img src="images/1B_1.jpg" alt="" width="1200" height="681" />
<img src="Images/4B_1.jpg" alt="" width="1200" height="681" />
<img src="images/3B_1.jpg" alt="" width="1200" height="681" />


<!-- wrapper -->

<!-- shell -->

<!-- container -->

<!-- header -->
<header id="header">


 

</header>
<!-- end of header -->
<!-- slider-holder -->

<!-- end of slider -->


<!-- end of navigation -->
<asp:ContentPlaceHolder ID="MainContent" runat="server">
<!-- main -->
<!-- end of main -->


 

<!-- footer -->

<!-- end of footer -->

<!-- end of container -->

<!-- end of shell -->

<!-- end of wrapper -->
</form>
</body>
</html>
Posted

Didnt unterstood what you have to say.


OR else get the id of the anchor tag and add focus() to it.
 
Share this answer
 
v2
CSS
a:link    {color:green;}
a:visited {color:green;}
a:hover   {color:red;}
a:active  {color:yellow;}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900