Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Is it possible to use an external css file to store image hyperlinks that will change on occasion.

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #31086
    sav
    Member

    Is it possible to use an external css file to store image hyperlinks that will change on occasion.

    In the past I have used mysql and a php page to load image link information that changes once and a while.

    Since an advantage of using an external css file is that I can mass change my html pages, I thought it might work if I was able to change a hyperlink in the css instead of making a call to a database.

    I have images on my pages that I can change by naming the new image the same as the old image, but if the new image links to a different url when clicked then I need to mass change the link in all pages, including my archived pages.

    Any other suggestions are welcome, I’m just trying to avoid using php to make database calls.

    Thanks in advance

    #68951
    Rob MacKay
    Participant

    you should really be using javascript (jQuery) for this if you don’t want to go server side scripting.

    Think of CSS as skin, not bone I suppose – and although there are ways to add text with CSS I would really not do even that lol

    So no. But look into javascript – and I would recommend jQuery. You could store all your needed URLs in an array and call them out at random – or however you require.

    #68890
    sav
    Member

    Thanks Rob. I will check our jQuery.
    Sounds like the way to go.

    All the best

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.