How to give anchor type look to some element?

Hi there

I am working on an application where I want to perform some AJAX events when user Clicks on it I want to show it like as a pointer.But I don’t want to use Anchor <a> tag.

Is there any solution for this?

Hi,

If you are adding click events to the element then you can basically use any element and just add ‘cursor:pointer’ to it and it will work fine.

However, it would be more semantic perhaps to use the button element instead which can be styled as you want and will allow the element to be tabbed and focussed to.

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
.btn {
	-webkit-appearance:none;
	appearance:none;
	border:none;
	background:none;
	margin:0;
	padding:0;
	display:linline-block;
	vertical-align:middle;
	cursor:pointer;
	color:blue;
}
.btn:hover {
	text-decoration:underline
}
</style>
</head>

<body>
This
<button class="btn" type="button">Button text</button>
can be used as your click trigger
</body>
</html>

@PaulOB

Thanks excatly I am looking for

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.