jkhippie Posted April 15, 2015 Share Posted April 15, 2015 I'm making a <table> of politicians. <th colspan="2">Name</th> <td><img></td> <td>List of Committes They Belong To <ul> <li>Budget</li> <!- These will -> <li>Finance</li> <!- be links -> </ul> </td> Something like that. Now, I want to make each committee name link to something that may change at some point - maybe, to start, it links to the Wiki about that committee, and maybe later I decide I'd rather link to the ".gov" instead. I'd like to avoid having to change every link in the HTML to do this. Is it possible to somehow use classes in the HTML and put the actual links in the CSS so I can make one change there to change all the instances of each link in the HTML? Did I explain that well enough? Link to comment Share on other sites More sharing options...
Ingolme Posted April 15, 2015 Share Posted April 15, 2015 CSS changes only the appearance of the elements, nothing more. That is its purpose. You need to change the attributes in the HTML itself. If you have a server-side language, you can make one menu and load it into all the pages. Link to comment Share on other sites More sharing options...
jkhippie Posted April 15, 2015 Author Share Posted April 15, 2015 Thanks. js it is, then. Link to comment Share on other sites More sharing options...
Ingolme Posted April 15, 2015 Share Posted April 15, 2015 Javascript isn't a server-side language. Link to comment Share on other sites More sharing options...
jkhippie Posted April 16, 2015 Author Share Posted April 16, 2015 No, but it would still allow me to make the change in one spot instead of dozens. Anyway, I went with '#' links to another spot on the page where I can have the external links just once and change them there. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now