bleustreak12 Posted July 24, 2009 Share Posted July 24, 2009 i have a div which has an id in that i have a div which has a class name then i have a table in the second div and in that i have few links (ie. <a href=...</a>) <div id="nav"> <ul> <div class="moduletable_menu"> <table width="100%" cellspacing="1" cellpadding="0" border="0"> <tbody> <tr> <td nowrap="nowrap"> <a class="mainlevel" href="ssssssss">Home</a> <a class="mainlevel" href="ssssssssd">About</a> <a class="mainlevel" href="ddddddd">News2</a> <a class="mainlevel" href="ddddddd">News21</a> <a class="mainlevel" href="ddddddd">News4</a> <a class="mainlevel" href="ddddddd">News4</a> </td> </tr> </tbody> </table> </div> </ul> </div> now i want to change the css of the link only on certain pages . So i was thinking wheteher i could get the current url of the page and if it is the right one then the propertioes of the 2nd or 3rd link change and if it is on another page the 1st link should change at any time i may require to chnage atleast one link so i will require php code which if on the right page selects the 2nd or third link to change and on another page the 1st link i would really like to know if i can achieve this through php coding and if so then how How will i achieve this can anybody please help me Link to comment https://forums.phpfreaks.com/topic/167233-chnaging-links-css-properties-depending-on-pages/ Share on other sites More sharing options...
bleustreak12 Posted July 24, 2009 Author Share Posted July 24, 2009 can somebody atleast tell me how to select the third link in a table without having to change the html source Link to comment https://forums.phpfreaks.com/topic/167233-chnaging-links-css-properties-depending-on-pages/#findComment-881766 Share on other sites More sharing options...
bleustreak12 Posted July 24, 2009 Author Share Posted July 24, 2009 i just want to change a certain link border or color without changing the source Link to comment https://forums.phpfreaks.com/topic/167233-chnaging-links-css-properties-depending-on-pages/#findComment-881774 Share on other sites More sharing options...
bleustreak12 Posted July 24, 2009 Author Share Posted July 24, 2009 could i not get to loop through the links in the table in the div and change or give different css styling or files to each link Link to comment https://forums.phpfreaks.com/topic/167233-chnaging-links-css-properties-depending-on-pages/#findComment-881782 Share on other sites More sharing options...
haku Posted July 24, 2009 Share Posted July 24, 2009 Don't start multiple threads on the same topic. And don't post in it five time while waiting for someone to respond to it. Anyways, the only way to do this without changing the source is through javascript. Stick wtih your thread in there. Link to comment https://forums.phpfreaks.com/topic/167233-chnaging-links-css-properties-depending-on-pages/#findComment-881841 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.