SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jan 2014
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Link not clickable in Firefox or Opera

    I am developing a site here: http://195.8.196.32/~grange/

    I have a problem in Firefox and Opera where the Checkout button in the Basket menu item isn't clickable. The button looks like it's been clicked, but the simple action of going to basket.php doesn't happen.

    To test this, go to the site, add some books to the basket and then hover over the Basket. The basket contents will scroll down with the Checkout link at the bottom.

    This works perfectly in all other browsers I have tried.

    Any ideas? Thank you.

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,877
    Mentioned
    160 Post(s)
    Tagged
    4 Thread(s)
    Hi,

    You have a link inside a button which is not allowed and therefore Firefox ignores it.

    In html5 you can wrap the anchor around the button but and it should work ok.
    Code:
    <div> 
      <a href="http://www.google.com">
    	<button>Google</button>
     </a> 
    </div>
    However as you really want a link anyway why not just use the anchor alone?

    e.g.
    Code:
    <a class="pull-right btn btn-success" href="basket.php">Checkout<span class="icon-white icon-chevron-right"></span></a>
    You may have to teak the margins a little.
    Last edited by Paul O'B; Jan 21, 2014 at 14:37.

  3. #3
    SitePoint Member
    Join Date
    Jan 2014
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Brilliant. Thank you Paul - I would have been tearing my hair out for ages over that. Much appreciated.


Bookmarks

Posting Permissions

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