Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CSS for rollover text color change.

New Here ,
Jul 29, 2017 Jul 29, 2017

I have been trying to get my text links to change color from white to yellow upon a rollover, and the css I have tried is not working. Please help!

link: Guilford Garden Center - Where Gardening is Fun!

1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 29, 2017 Jul 29, 2017

You should combine your CSS code into one external stylesheet for easier site management.

Put your navigation styles below the text link styles in this order.

a { font-weight: normal; text-decoration:none}

a:link, a:visited {color: #FFF;}

a:hover, a:active, a:focus {color: #FFED00;}

nav ul { list-style-type: none;}

nav ul li a {

text-decoration: none;

color: #ffffff;

text-align: center;

display: block;

text-transform: uppercase;

padding: 8px;

}

nav ul li a:hover, nav ul li a:active, nav ul li a:focus {

color:

...
Translate
Community Expert ,
Jul 29, 2017 Jul 29, 2017

I assume by links you mean the navigation.

Try this.

nav ul li a:hover {

     color:yellow;

     text-decoration:underline;

}

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 29, 2017 Jul 29, 2017

Thanks Nancy. Yes, the nav.

Where should I enter this? Here is my current source:

<style type="text/css">

body {

background-color: #7fbb24;

}

a:link {

color: #FFFFFF;

text-decoration: none;

}

a:visited {

text-decoration: none;

color: #FFFFFF;

}

a:hover {

text-decoration: none;

color: #FFED00;

}

a:active {

text-decoration: none;

color: #FFED00;

}

a {

font-weight: normal;

}

</style>

                    and here is the current nav css:

}

.style-nav ul {

list-style-type: none;

}

.style-nav ul li a {

text-decoration: none;

color: #ffffff;

text-align: center;

display: block;

text-transform: uppercase;

padding: 8px;

}

Thank you for your help. This used to be so easy for me before css... page properties, links, adjust, done. It's taking me a very long time to adjust to everything....

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 29, 2017 Jul 29, 2017

You should combine your CSS code into one external stylesheet for easier site management.

Put your navigation styles below the text link styles in this order.

a { font-weight: normal; text-decoration:none}

a:link, a:visited {color: #FFF;}

a:hover, a:active, a:focus {color: #FFED00;}

nav ul { list-style-type: none;}

nav ul li a {

text-decoration: none;

color: #ffffff;

text-align: center;

display: block;

text-transform: uppercase;

padding: 8px;

}

nav ul li a:hover, nav ul li a:active, nav ul li a:focus {

color: yellow;

text-decoration:underline;

}

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 29, 2017 Jul 29, 2017
LATEST

Thanks. I'll try that.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines