html - Links with Active State -
this first time posting here. highly appreciated.
i trying set "active" state links ids database. current active links different style. have set different color here testing:
here code:
$query = "select * recipes categoryid = '".$mycategory['categoryid']."'"; $result = mysql_query($query); while($row = mysql_fetch_array($result)) { echo "<ul class=\"nav_style\"><li><a href=\"?recipeid=".$row['recipeid']."\"> ".$row['recipename']."</a></li></ul>";
here css:
.nav_style a:link, .nav_style a:visited { color: #c0c0c0; text-decoration: none; } .nav_style a:hover { color: #58595b; text-decoration: none; } .nav_style a:active { color: #eee; text-decoration: none; }
note part of url coming database. highly appreciate help.
thanks,
$query = "select * recipes categoryid = $mycategory['categoryid']";
remove echo , paste this:
echo '<ul class="nav_style"><li><a href="?recipeid="'.$row['recipeid'].'"" class="'.$row['<statte_column_name'].'"> '.$row['recipename'].'</a></li></ul>';
state_column_name: write state column name table whatever name have given column.
Comments
Post a Comment