Solved

Problem with hover on display

Posted on 2014-10-21
8
84 Views
Last Modified: 2014-10-23
I'm having problems trying to figure this out.  It's very simple and I can't see it!!!!

I have a table that looks something like this:
--------------------------------------
Address
Building Name
Crossing Street
---------------------------------------

What I want to do is just do a hover on the address.

Here's the code that I'm using:

echo "<tr>";
                        echo '<td style= "text-align:left"';
                        echo ' font color= "blue" class="Body_Labels">';
                              //Address
                              $work = "$ROW[ADDRESS]";
                              $work = trim($work);
                              $_SESSION['Data'] = $ROW['SEQ'].$ROW['STOREKEY'];
                        
                              echo '<a href="Space_Display.php?id=';
                                    echo $_SESSION['Data'];
                                    echo '">';
                                    echo "$work";
                              echo "</a>";

                              echo "<style>";
                                    echo "#left_Table a:hover{";
                                    echo "text-decoration:none;";
                                    echo "color:#0000FF";
                                    echo "}";
                              echo "</style>";                  
                              
                              $work = "$ROW[ADDRESS]";
                              $work = trim($work);

                              echo "<br>";
                              echo "$ROW[BNME]";
                        
                              echo "<br>";
                              echo "$ROW[CRST]";
                        
                              echo "<br>";
                              echo "</td>";

I know it's on the <href> but it hilights the address with a blue underline.

Thanks
Glenn
0
Comment
Question by:breeze351
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40395450
Hover to do what?

This isn't valid
font color= "blue"
0
 

Author Comment

by:breeze351
ID: 40395636
By hover, I meant that when the cursor goes over the text it will change to blue rather than having text in blue with an underline.
0
 
LVL 58

Expert Comment

by:Gary
ID: 40395653
An anchor tag will be blue and underlined by default, if you want to override the style then you have to add your own styles

a {
    color:green /* or whatever color it should be */
    text-decoration:none
}
a:hover {
    color:blue /* or whatever color it should be */
}

Open in new window


And please attend to this question
http://www.experts-exchange.com/Q_28531393.html
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:breeze351
ID: 40397860
Ok, I'm a moron that needs help!!!!
I changed the code to read as follows:

                        echo '<td style= "text-align:left"';
                        echo ' font color= "black" class="Body_Labels">';
                              //Address
                              
                              $_SESSION['Data'] = $ROW['SEQ'].$ROW['STOREKEY'];
                                          
                                    // ****************************************************
                              // * Display Address                                  *
                                    // ****************************************************
                                    echo "<style>";
                                          echo "a ";
                                                echo "{";
                                                      echo "color:black";
                                                      echo "text-decoration:none";
                                                echo "}";
                                                
                                          echo "a:hover ";
                                                echo "{";
                                                echo "color:blue";
                                          echo "}";
                                    echo "</style>";
                                          echo '<a href="Space_Display.php?id=';
                                                echo $_SESSION['Data'];
                                                echo '">';
                                                echo "$ROW[ADDRESS]";
                                          echo "</a>";

I still end up with the address in an underline blue.

I'm not the greatest at this.  I just wish they would let me get back to the data side of this site.  That's what I'm good at.

Thanks
Glenn
0
 
LVL 58

Expert Comment

by:Gary
ID: 40397915
Don't write styles inline - add them to your css file.
Have you got a link to look at?
0
 

Author Comment

by:breeze351
ID: 40400161
Got It!!!!
Last question.
What is a:active as opposed to a:link?
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40400165
0
 

Author Comment

by:breeze351
ID: 40400390
Gotcha.

Can I get back to the data now!!!! (See up above).

Thanks
Glenn
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question