Archived topic
Element styling inherited by body of page
3 replies · Started by Ryan on January 9, 2019
I created an element above the footer and used this code in it:
<div class="my-before-footer-content"> <center>Become a part of our family. <a href="schedule/">SCHEDULE NOW</a></center></div>
Then in my CSS I put this:
.my-before-footer-content {
background-color: #6d9faa;
padding:35px;
font-size: 35px;
line-height: 1.3em;
color:white;}
.my-before-footer-content a:link, a:active, a:visited {color:#696969;
font-weight: bold;
font-style: italic;}
.my-before-footer-content a:hover {color:#000000}
Now on my entire site body, the visited link is inheriting the color from the new element css. No other parts of the link are inheriting it though. If you scroll down the home page you can see a few links and after you click them and go back to the home page they are grey instead of the greenish they should be.
Hi there,
Likely because you didn't add .my-before-footer-content in front of a:active and a:visited
Thanks. I thought I could somehow lump them all under it once.
No problem :)