Solved

Problem with hover on display

Posted on 2014-10-21
8
80 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

863 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

20 Experts available now in Live!

Get 1:1 Help Now