Pauls74462 Posted June 25, 2010 Share Posted June 25, 2010 I have a web page that gets the domain from the db postes it on the page and makes a hyper link.I like to find out how to make the URL bold when the mouse is moved over it: <html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"--><title>Best Auto Sells</title></head><body><?phpinclude ("config.php");// Make a MySQL Connection$link2 = mysql_connect( $dbhost, $dbuser, $dbpass)or die("Could not connect: ".mysql_error());if (!$link2) { die('Could not connect: ' . mysql_error()); }// echo "Connected to db ";// select the databasemysql_select_db($dbname) or die ("Could not select database because ".mysql_error());$result = mysql_query("SELECT * FROM Members");?><div style="text-align: center;"><big><big><span style="font-family: Arial Black; font-weight: bold;">Clickon one of the url below for a list of automobiles!<p></p><p></p><p></p><p></p></span></big></big></div><?phpecho "<table border='1' width='500' align='center'><tr class='blackbg'><th width='25'>Id</th><th width='1000'>Domain</th><th width='75'>City</th><th width='25'>State</th><th width='25'>Zip</th></tr>";while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td width='25'>"; echo "<p align='center'>" . $row['id'] . "</td>"; echo "<td width='1000'>"; echo "<a href=" . $row['Domain'] . ">" . $row['Domain'] . "</a></td>"; //URL to have the rollover *bold* echo "<td width='75'>"; echo "<p align='center'>" . $row['City'] . "</td>"; echo "<td width='25'>"; echo "<p align='center'>" . $row['State'] . "</td>"; echo "<td width='25'>"; echo "<p align='center'>" . $row['Zip'] . "</td>"; echo "</tr>"; }echo "</table>";mysql_close($link2);?><br></body></html> Any ideal? Link to comment Share on other sites More sharing options...
Synook Posted June 25, 2010 Share Posted June 25, 2010 Just use the :hover pseudo-class to set font-weight:bold (in CSS). Link to comment Share on other sites More sharing options...
Pauls74462 Posted June 25, 2010 Author Share Posted June 25, 2010 Just use the :hover pseudo-class to set font-weight:bold (in CSS).This is all new, can you give a sample code? Link to comment Share on other sites More sharing options...
thescientist Posted June 25, 2010 Share Posted June 25, 2010 look in the tutorialshttp://www.w3schools.com/css/css_pseudo_classes.asp Link to comment Share on other sites More sharing options...
Pauls74462 Posted June 25, 2010 Author Share Posted June 25, 2010 while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td width='25'>"; echo "<p align='center'>" . $row['id'] . "</td>"; echo "<td width='1000'>"; echo "<a href=" . $row['Domain'] . ">" . $row['Domain'] . "</a></td>"; // How do I make this link BOLD when the mouse in over? echo "<td width='75'>"; echo "<p align='center'>" . $row['City'] . "</td>"; echo "<td width='25'>"; echo "<p align='center'>" . $row['State'] . "</td>"; echo "<td width='25'>"; echo "<p align='center'>" . $row['Zip'] . "</td>"; echo "</tr>"; }echo "</table>"; Link to comment Share on other sites More sharing options...
dsonesuk Posted June 25, 2010 Share Posted June 25, 2010 to target anchor link in table onlytable a:hover {font-weight:bold} Link to comment Share on other sites More sharing options...
Pauls74462 Posted June 25, 2010 Author Share Posted June 25, 2010 to target anchor link in table onlytable a:hover {font-weight:bold}Please give code sample, this css thing is all new! Link to comment Share on other sites More sharing options...
thescientist Posted June 25, 2010 Share Posted June 25, 2010 that is a code sample (and a fairly simple one at that). all anchor tags inside tables will turn bold when hovered over.might be worth reading the CSS tutorials if that doesn't make sense to you. Link to comment Share on other sites More sharing options...
Synook Posted June 26, 2010 Share Posted June 26, 2010 P.S. you may want to learn CSS before PHP, or else you won't be able to really control (visually) what you generate using the server-side language. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.