I am new to CSS but am eager to learn as much as possible. Right now I would like to know if CSS is capable of displaying URL's from a specific list. To clarify, I have a site (or will have) that contains multiple links to pages on other sites. If one of these other sites happens to modify the location of the page I am linking to, I would like to have the ability to change my reference to that link in only one place, regardless of how many times or on how many of my pages I use that particular link. Is this an available function of CSS?
Use CSS to display specific links
Hi Rsnetworks,
This isn't a feature available in CSS.
Luckily there are other ways you can do it.
If you are handy at a scripting language such as PHP or JavaScript, you could
write a function which stores the link addresses in an array then just call the array with the correct index to get the address.
Or you could store the address in a database.
If these suggestions sounds way to confusing there are scripts freely available to do it for you.
I created a linksystem a while ago that stores the address in a MySQL database.
The main purpose was to have one link page with many links and keep track of clicks.
You could easily use it for your site if you have PHP and MySQL available.
Use CSS to display specific links
Awesome, thank you for the information. Do you know of any sites where I might find these types of JavaScripts (unfortunately, I will not have access to PHP on the server where my site will be stored). Thanks again.
Use CSS to display specific links
Hi Rsnetworks,
Your external JavaScript file would contain
function linksa(x){
var linkarray= new Array();
linkarray[0]="<a href='www.appcreator.com'>appcreator</a>";
linkarray[1]="<a href='www.csscreator.com'>csscreator</a>";
return linkarray[x];
}In the Head section of each of your pages add
<script language="JavaScript" src="filename.js"></script>
In the document where you want a link
<script language="JavaScript" type="text/javascript"> <!-- document.write(linksa(1)); document.write(linksa(0)); //--> </script>
Use CSS to display specific links
Someone's bored... :?:
Use CSS to display specific links
Someone's bored... :?:
Looks like it.
Posts have now been deleted.