Support » Themes and Templates » CSS to format specific rel= relationships ?

  • Resolved thornomad

    (@thornomad)


    Hello! I was wondering if there was a standard’s compliant way to style links differently based on their rel="attribute" ?

    For example, I use lightbox to display some of the images on my site; I would like to have links to those images styled differently than my other links. From what I know now, I could do a:

    a[href$=".png"] { background: url('linkimage.gif'); }

    However, because I already have to signify my links with a rel="lightbox", I thought that might be a better way to gaurantee that all the links to images with the correct rel= tag would have the little image next to them.

    Can I do that? Thanks!

Viewing 1 replies (of 1 total)
  • Oh never mind, it was obvious. Just change the href to rel like so:

    a[rel="lightbox"] { background: here; }

Viewing 1 replies (of 1 total)
  • The topic ‘CSS to format specific rel= relationships ?’ is closed to new replies.