...

View Full Version : Resolved Using a Button as an Anchor



brodjah
05-17-2009, 03:51 PM
Basically I am designing a simple shop website. On my page I would like to have buttons that as used as anchors to link to other parts of the SAME page.

I know I can use buttons using javascript to go to different pages using...


<input type="button" value="Go To Checkout" onclick="location.href =
'URL goes here';" />

However I would now like to make buttons that link from the button to a sertain point on the same page, in this case, make a "view my basket" button go to where the basket is on the same page but can't seem to figure out how.

Any ideas?

Thanks,
Mike

abduraooft
05-17-2009, 04:00 PM
Think about the reverse. ie, how to style an anchor to give the looks of a button. You my achieve this by the following CSS

<a class="button" href="myfile.html">Cancel</a>

a.button {
background:#D4D0C8 none repeat scroll 0;
border-color:#FFFFFF #000000 #000000 #FFFFFF;
border-style:solid;
border-width:1px;
cursor:default;
float:left;
margin-left:10px;
padding:0 4px;
}

brodjah
05-17-2009, 05:09 PM
Cheers mate. Perfect!!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum