Jump to content
Pauls74462

MouseOver bold Link

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Just use the :hover pseudo-class to set font-weight:bold (in CSS).
This is all new, can you give a sample code?

Share this post


Link to post
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>";

Edited by Pauls74462

Share this post


Link to post
Share on other sites
to target anchor link in table onlytable a:hover {font-weight:bold}
Please give code sample, this css thing is all new!

Share this post


Link to post
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.

Edited by thescientist

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...