Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    May 2009
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Using a Button as an Anchor

    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
    Last edited by brodjah; 05-17-2009 at 05:16 PM.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    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
    Code:
    <a class="button" href="myfile.html">Cancel</a>
    Code:
    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;
    }
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    brodjah (05-17-2009)

  • #3
    New to the CF scene
    Join Date
    May 2009
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Cheers mate. Perfect!!


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •