• Hi,
    I am wondering if there is a way to assign a link within a category a different color than that of the average link in the links list. If you look at my blog http://www.readingtheworld.com – you will see a category called Iowa Electronic Markets – with bush and kerry in blue and red respectively. I had to hard code this link into the index.php in order to get the color variation. Is there any way to get this to happen organically, so I can administer these links through the back end, instead of having to edit index.php every time the values change? I tried putting the html for the color switch in the name of the link, which worked for the list of links in the link manager – but not on the home page of my site. And I had to delete the link alltogether to edit it. Any ideas?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Typo in the url

    In admin/categories add this: <span style=”color:#FF0000; “>category name</span> to the category name. For example; <span style=”color:#FF0000; “>Wordpress</span>. This will make the name “WordPress” Red. Check out the categories on our site: Collins-house

    What about cunningly nesting this link between two other categories in a category of its own and then styling the whole category using the relevant selector. Because it is the only link in that category it would be the only one with the style. Seems a lot of work but in reality it should only take a few minutes to set it up.

    Thread Starter itsmebekka

    (@itsmebekka)

    root: is it possible to to do two different colors within a single link? Can you give me a code sample that you think would work? I had actually thought I would make the two candidates two different links – just to the same URL

    Thread Starter itsmebekka

    (@itsmebekka)

    usafdcc: it’s not the category name color i want to change – but the links within the category … ? ideas?
    Thanks!

    @usafdcc: Whatever we do here on this q we certainly want to avoid any inline styling or unecessary spans I would think.
    As to different colors for one link I would not have thought that was possible but
    as always I may be wrong . Returning to the original question there is also not – again – to my knowledge any code for *the third link down* or similar. BUT. If you define three categories, put a few links in cat 1 and cat3 and a single link in cat2 it will be in the middle. Now you can style categories using the new cat ids. So you style cats 1, 2, 3 the same except the difference in cat 2. There it is. Your single link will stand out. For two links just do 4 cats. Simple but fiddly.

    umm….Okay whatever works.

    Well you cloud adda js quicktag for a link with a class and style the class in the CSS. On reflection it might be less of a palaver.

    Thread Starter itsmebekka

    (@itsmebekka)

    Root: what would code for JS quicktag look like?
    Also, maybe I am misunderstanding your advice, but the different colored links are within a single category … so changing the css for individual categories won’t fix my problem.
    http://www.readingtheworld.com See the Iowa Electronic Markets Link Category group. There’s a red Bush and a blue Kerry under the heading “Iowa Electronic Markets”
    PS – I’m going out of town until the weekend – so when I dissapear for a few days it won’t be because my problem is solved, or that I’ve given up. If I figure it out I’ll post the answer here.
    Thanks!
    Rebecca

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Specify different colors in Links?’ is closed to new replies.