Download Anchor

Discussion in 'HTML' started by shapper, Oct 18, 2009.

  1. shapper

    shapper Guest

    Hello,

    I need a download link with the text "download" and an icon on the
    right.
    My idea is to use an anchor and have the icon placed with CSS as a
    background image.

    Is this the correct approach?

    Thanks,
    Miguel
    shapper, Oct 18, 2009
    #1
    1. Advertising

  2. Gazing into my crystal ball I observed shapper <>
    writing in news:ac310f3d-bb5c-4eec-8aa4-129af32b8d43
    @g31g2000yqc.googlegroups.com:

    > Hello,
    >
    > I need a download link with the text "download" and an icon on the
    > right.
    > My idea is to use an anchor and have the icon placed with CSS as a
    > background image.
    >
    > Is this the correct approach?
    >
    > Thanks,
    > Miguel
    >


    Sure, you could do something like:

    <a href="mydownloadthing.rar" title="Download in RAR format"
    class="download">Download mydownloadthing (size)</a>

    a.download {
    background-repeat:no-repeat;
    background-position:right;
    padding-right:20px;}

    a.download:link, a.download:hover, a.download:focus {
    background-image: url(download.png);
    }
    a.download:visited {
    background-image: url(smile.png);
    }
    a.download:active {
    background-image: url(lightening.png);
    }
    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne Boswell, Oct 18, 2009
    #2
    1. Advertising

  3. shapper

    dorayme Guest

    In article
    <>,
    shapper <> wrote:

    > I need a download link with the text "download" and an icon on the
    > right.
    > My idea is to use an anchor and have the icon placed with CSS as a
    > background image.
    >
    > Is this the correct approach?


    It is not "the" correct approach but it is a perfectly sound one. There
    are other sound approaches where, for example, you want the double
    whammy of making both text and image links, arguably quite useful for
    many users.

    --
    dorayme
    dorayme, Oct 18, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ryan Taylor
    Replies:
    2
    Views:
    922
    Ryan Taylor
    Nov 10, 2004
  2. Steve C. Orr [MVP, MCSD]
    Replies:
    0
    Views:
    1,588
    Steve C. Orr [MVP, MCSD]
    Mar 7, 2005
  3. Sam --
    Replies:
    2
    Views:
    594
    Sam --
    Mar 17, 2005
  4. Rafal Majda
    Replies:
    5
    Views:
    2,232
    Rafal Majda
    Apr 18, 2005
  5. Todd Cary

    Anchor to download a file

    Todd Cary, Oct 23, 2003, in forum: HTML
    Replies:
    1
    Views:
    674
    William Tasso
    Oct 23, 2003
Loading...

Share This Page