Solved

Problem with hover on display

Posted on 2014-10-21
8
81 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
  • 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
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 add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

813 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now