23, 2010 14:51 by felgall in this thread back in 2008 >
He says he uses underlines to differentiate external links
Well how to you have a css sheet set up to do the opposite to that EG underline internal links and no underlines for external link, so does anyone know how that is coded in a stylesheet please?
Or better still
I have a network of sites and I would ideally like to have my links as all 900b09 in the main and hover overs are all 339900 (I have my reasons they have been discussed and analysed and that is how things will be) but as I say I have a network of sites so ideally I want people to know once they are in the network and know that that when they are moving sites within the network the hover over will tell them so once they get used to it by the different coloured hover over
this is not to complicate things as, for example I have a forum that can be reached from multiple sites and it would make life a lot easier if at times like that the hover over turned say a blue colour
so how can I accomplish this with CSS? Also how is the CSS going to know it is an external link.
hmm how exactly do I code that then?
Where is the gentleman felgall who did it with underlines? You about Sir?
I may also like to say I don’t want to get into arguments about the pros and cons or the use of icons or the BBC or other sites giving warnings of external links
I ultimately once the sites are successful enough would like to take things one step further so all sites on my servers are one colour and all on other servers are a different colour and yet all on site links remain the 339900 hover over as internal to site but that is another story. (And part of a game I have planned to).
However, you really want the CSS3 selectors.
hmm interesting read thanks logic_earth
If I am reading the CSS3 selectors article right that means in order to have external links a different colour they would be the http links and internal links would then have to be only file links
Now if I am using full links in my links and not just paths I take it that is going to negate this from working then. Am I right?
If so it is back to the drawing board then as I would rather sacrifice the idea of different coloured links as opposed to losing my full path URL links and having to use file path links in my linking structure.
I just added a class to all the external links – as when I started with it the CSS2 selector wasn’t supported by most browsers (and still isn’t by some).
The reason I decided to underline the external addresses and not underline the internal ones is because the ads displayed in iframes that are not affected by any styles on the site all have their external links underlined.
Using the full address to link to pages on the same site is very inefficient compared to just referencing them using a relative address.
In a nutshell, the CSS only knows it’s an internal/external link if (a) you put a class on the link, or (b) you start external links with http: and use relative references for internal links.
I would be wary about doing too much to distinguish between internal and external links. Remember that you will be living and breathing this site, so what seems blindingly obvious to you will go straight over the heads of most of your readers, and they’ll just be struggling to work out why some links are pink and some are green (if they even notice they are different colours).