0
Welcome Guest! Login
0 items Join Now

ROCKETTHEME IS CLOSING JUNE 30, 2025. Read our  Farewell Blog Post  for more info.

adding pdf icons to appropriate category list links

  • adding pdf icons to appropriate category list links

    Posted 12 years 9 months ago
    • Hello,

      I tried this on a different board, and hoped I'd have more luck submitting it here.

      I'm trying to add a pdf icon to all pdf links. I edited the css code with this:
      a[href$='.pdf'] {
           display:inline-block;
           padding-right:20px;
          background:transparent url(http://www.dioceseofcleveland.org/worship/images/pdficon_small.png) center right no-repeat;
      }

      for the main Hivemind template, and it works for all links that I've entered into an article ex.( dioceseofcleveland.org/worship/ )

      But, on pages where I have a category list of weblinks ex.( dioceseofcleveland.org/worship/index.php...gory&id=80&Itemid=50 ) it is not using the ".pdf" from the title of the pdf document, so the css code that worked above is ignored.

      I tried putting this in the template CSS, since the web category list layout links now end with "Itemid=50":
      a[href$='Itemid=50'] {
                display:inline-block;
                padding-right:20px;
               background-image: url(http://www.dioceseofcleveland.org/worsh ... _small.png) center right no-repeat;
           }

      It seems to have done something, because it moved some of my long pdf links down, but I think the image is in the background behind the <td>

      Any ideas on how I can add this same sort of formatting to ONLY pdfs in the category weblinks tables would be greatly appreciated.

      Thanks,
      Janet
    • Who?'s Avatar
    • Who?
    • Preeminent Rocketeer
    • Posts: 25562
    • Thanks: 613
    • Joomla freelancer

    Re: adding pdf icons to appropriate category list links

    Posted 12 years 9 months ago
    • You actually have error in that css code. Correct it to this and it will work:
      a[href$="Itemid=50"] {
      display: inline-block;
      padding-right: 20px;
      background: transparent url(http://www.dioceseofcleveland.org/worship/images/pdficon_small.png) center right no-repeat;
      }
    • Check my services at: Mihha-Vision
  • Re: adding pdf icons to appropriate category list links

    Posted 12 years 9 months ago
    • Igor, THANKS SO MUCH! That did the trick.

      Sorry too for posting twice, I thought I might have posted in the wrong category, so repeated my question in a different one. I know now, it's not necessary.

      Thanks again,
      Janet
    • Who?'s Avatar
    • Who?
    • Preeminent Rocketeer
    • Posts: 25562
    • Thanks: 613
    • Joomla freelancer

    Re: adding pdf icons to appropriate category list links

    Posted 12 years 9 months ago
    • You're welcome, If this resolves your problem then please edit your first post in this thread by adding [SOLVED] at the start of the title and then select the green tick icon. This lets the moderators know that it can be moved to the solved section.
    • Check my services at: Mihha-Vision

Time to create page: 0.062 seconds