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 2 of 2
  1. #1
    New Coder
    Join Date
    Oct 2005
    Posts
    61
    Thanks
    12
    Thanked 0 Times in 0 Posts

    adding file types to links css

    hello,

    i found the following css to show icons based on the file types or if the <a> tag has http..

    PHP Code:
    a[href$='.zip'], a[href$='.rar'], a[href$='.gzip'] {
    background:transparent url(../images/zip.pngcenter left no-repeat;
    display:inline-block;
    padding-left:20px;
    line-height:18px;

    or for http
    PHP Code:
    a[href^="http://"] {
    background:transparent url(../images/external.pngcenter right no-repeat;
    display:inline-block;
    padding-right:15px;

    Now, most of my <li> lists have more than single <a> but i only want to show the above mentioned icons, if href^="readfile.php?" and href$=pdf...

    so basically need help combining the above two together.
    thank you

  • #2
    New Coder
    Join Date
    Oct 2005
    Posts
    61
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Lightbulb

    nevermind, i got it.

    added id value and used

    PHP Code:
    a[id $='.doc'] {
    background:transparent url(img/word.pngcenter left no-repeat;
    display:inline-block;
    padding-left:20px;
    line-height:15px;



  •  

    Posting Permissions

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