473,382 Members | 1,658 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

I cant get my link to change colour on hover

This is my html. I want every link to change color when I hover my mouse over it.

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="http://bytes.com/C:\Users\John\Desktop\Work\Why Not.css"> </head> <title>Why Not!</title> <a href="http://bytes.com/C:\Users\Sammy\Desktop\School Work\ICT\LATEST WEBSITE\Why Not.html" class="why" style="text-decoration:none"> <div id="why" style="border: 2px solid green; background-color: yellow;"> <h1>Why Not!</h1> </div> </a> <a href="http://bytes.com/C:\Users\Sammy\Desktop\School Work\ICT\LATEST WEBSITE\About Us.html" class="why" style="text-decoration:none"> <div id="about" style="border: 2px solid blue; background-color: yellow;"> <h1>About Us</h1> </div> </a> <a href="http://bytes.com/C:\Users\Sammy\Desktop\School Work\ICT\LATEST WEBSITE\Contact Us.html" class="why" style="text-decoration:none"> <div id="locator" style="border: 2px solid red; background-color: yellow;"> <h1>Contact Us</h1> </div> </a>
  2.  
  3. This is my CSS for the above html.
  4.  
  5. h1 {
  6.      text-align: center;
  7. }
  8.  
  9. #locator {
  10.      color: red;
  11.      border-radius: 20px;
  12.  
  13. }
  14.  
  15. #locator{
  16.      position: absolute;
  17.      visibility: show;
  18.      left: 1000px;
  19.      top: 10px;
  20.      z-index: 1;
  21. }
  22.  
  23. #about{
  24.      color: blue;
  25.      border-radius: 20px;
  26. }
  27.  
  28. #about{
  29.      position: absolute;
  30.      visibility: show;
  31.      left: 619px;
  32.      top: 10px;
  33.      z-index: 1;
  34. }
  35.  
  36. #why{
  37.      color: green;
  38.      border-radius: 20px;
  39. }
  40.  
  41. #why{
  42.      position: absolute;
  43.      visibility: show;
  44.      left: 238px;
  45.      top: 10px;
  46.      z-index: 1;
  47. }
Jun 23 '14 #1
2 1509
Rabbit
12,516 Expert Mod 8TB
Please use code tags when posting code or formatted data.

You don't have any code for the hover psuedo-class. Also, why are you defining every class twice? That doesn't make sense.
Jun 23 '14 #2
Exequiel
288 256MB
try this for hover in about.
Expand|Select|Wrap|Line Numbers
  1. #about:hover{
  2.      color: green;
  3. }
Jun 24 '14 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Steve | last post by:
I have some standard toolbars on some of my screens and they are standard grey. Problem is the rest of our app is light blue, and they look out of place. Is there a way of changing the colour of...
1
by: amber | last post by:
Hi there, I'd like to change the colour of my tabs. I can change my background colour of my tab control, but the actual tabs, with the text on them don't change colour. Am I missing something?...
6
by: Karl | last post by:
Hi, Ok so on a given page I have 4 text links: see it in black see it in blue see it in red see it in green using the standard swap image behavior, clicking on one of the above links
4
by: gurdz | last post by:
Does anyone know how to change the colour of the text in the console in C??
5
by: Bubba | last post by:
I need to use an inline css tag for a few links that will not behave like the a:link and a:hover attributes in my stylesheet. I want to add a special link color with underline and a mouseover...
0
by: satish | last post by:
I have a table with two columns field1 int,Field2 and added a column to datagrid on runtime sum (field1+field2) ,upon changing the data in either of the fileds the sum field or column too changes ....
1
by: satish | last post by:
I have a table with two columns field1 int,Field2 and added a column to datagrid on runtime sum (field1+field2) ,upon changing the data in either of the fileds the sum field or column too changes ....
1
by: wtlemon | last post by:
I have a background image within a div. When I hover over it, it goes from black&white to color. Now all I need to do, is figure out to link it to a website. I want, when hovered/turns to color - for...
0
by: muddasirmunir | last post by:
If we use manifest.exe in our folder, it will give our application XP look , and the default colour its shws is blue , can we change this colour to some other colours and if so how?
5
markmcgookin
by: markmcgookin | last post by:
Hi folks, I have a WPF Datagrid in a WPF Project Window. I have populated the grid with a datatable, and autogenerated the columns (unfortunately a necessity) and have a requirement to change the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.