Jump to content

MouseOver bold Link


Pauls74462

Recommended Posts

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

Just use the :hover pseudo-class to set font-weight:bold (in CSS).

Link to comment
Share on other sites

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...