Solved

Problem with hover on display

Posted on 2014-10-21
8
78 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
Comment Utility
Hover to do what?

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

Author Comment

by:breeze351
Comment Utility
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
Comment Utility
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
 

Author Comment

by:breeze351
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 58

Expert Comment

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

Author Comment

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

Accepted Solution

by:
Gary earned 500 total points
Comment Utility
0
 

Author Comment

by:breeze351
Comment Utility
Gotcha.

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

Thanks
Glenn
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
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 define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

762 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

11 Experts available now in Live!

Get 1:1 Help Now