Forums

Customize link css for targets (9 posts)

  1. BebiR0x0rs
    Member
    Posted 4 years ago #

    While searching for more plugins to install, I recall running across a plugin that allows to customize css for links, for example changing how links that open in a new window look by adding an image or changing the color from regular links ior addin a title="opens in new window" (by some kind of auto fashion that applies to all links compared to manually doing it each time posting a link). I've done a search on the codex plugins list as well as wp-plugins.net but I can't seem to find it. I'm not sure if I imagined the whole thing or if I've simply overlooked it. Can anyone set me straight on this phantom plugin? Thanks.

  2. jdingman
    Member
    Posted 4 years ago #

    the last time I checked, setting a target="_blank" under the XHTML that Wordpress uses will render your site invalid XHTML. You can use it, but what will happen is that it will not abide by the XHTML validation that the standards are set to.

    I don't believe there is a plugin for it for the reason that it renders the code invalid.

  3. BebiR0x0rs
    Member
    Posted 4 years ago #

    I'm not a code geek, I could really care less about it being valid (call me a rebel outcast I suppose). :X Just kinda driving me nuts when I can't remember where I saw something or what something is etc, or as it seems in this case....imagining something up and swearing it was real. >_<

  4. LesBessant
    Moderator
    Posted 4 years ago #

    External link icons might be what you're after.

  5. BebiR0x0rs
    Member
    Posted 4 years ago #

    Thanks, that looks to be exactly what I had seen. ;)

  6. drobbins
    Member
    Posted 4 years ago #

    You could also just use CSS to do all this for you; for example, you could put all the "regular" links in one div with an id of, let's say, "sidebarbox1" and the links you want to open in a new window in a div with an id of "sidebarbox2" - then just use the style sheet to customize how you want them to look. So, something like this -

    #sidebarbox1 a {
    color: #CCCCCC
    }
    #sidebarbox2 {
    color: #FFFFFF;
    background-image: url(/somedirectory/someimagename.jpg);
    }

    This way, the regular links are whatever text color you set it to, and the second have a different text color, and an image as the background. I think you might still have to use javascript to open the links in a new window (not sure how it is done in WP), but that way you don't have to add an extra PHP code to execute at each link to form the image.

    Also, you don't have to use divs - you can make it classes or whatever you want, really - that is the beauty of CSS, the possibilties are virtually endless!

  7. Viper007Bond
    Member
    Posted 4 years ago #

  8. Monika
    Member
    Posted 4 years ago #

    BebiR0x0rs
    if you are using target _blank ..this is the html code to open a link in a new window,
    you foist your user on get a *open window soup* (I can't name this in other words and hope you understand my intention of this words;))
    kindly regards
    Monika

  9. holyroller
    Member
    Posted 4 years ago #

    Instead of background image for the CSS, how would I tell it to put the image at the end or at the beginning of the text for the link? I'm trying out the Identify-External-Links plugin again. The author of the plugin says to use "a.extlink { }" in the CSS.

    I looked over the stylesheet for Wikipedia, to see what they do, but none of the *external had an image associated with it. At least not one I could identify.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.