Support » Developing with WordPress » how to change clickable footer text color

  • Hello, yesterday i changed my footer text to clickable text, now that text is highlighted with blue color but i want to have it gray like the rest of texts on my blog but still clickable.

    <div class="footer-wrap">
    	<div class="container">
    		<?php wp_nav_menu( array( 'theme_location' => 'bottom-nav') ); ?>
    		<p> Copyright © 2017 <a href="http://www.wallpaperstapety.sk">wallpaperstapety.sk</a></p>
    		</div>

    So how can i change the color to grey, but keep the rest of texts on my blog unchanged? Thanks for help

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Please provide a link to a page on your site where we can see this. Thanks.

    Hi @ dusanb17

    This is a matter of CSS Specificity. If you wish to change a particular element’s text without affecting similar elements (such as paragraphs or anchor text) you would need to write your css as follows:

    .footer-wrap a{
    color: gray;
    }

    This code tells the browser to search for all a tags underneath the element tagged with the footer-wrap class.

    Now, you may want to find out what the specific color of your text is and modify my code to match. If you are in Chrome, please right click the text you are trying to mimic and go to ‘Inspect’ (or on Windows, Ctrl + Shift + I) navigate the html tree to the actual text block, probably under a p tag. Look to the box that says ‘Styles’ and find the paragraphs CSS styles, look for color: and copy whatever the color hex code is. Use that to style the anchor tag.

    Please respond if this solution does or does not work and we can troubleshoot futher.

    Chris

    Thread Starter dusanb17

    (@dusanb17)

    Thank you both for your reply,
    jjchrisdiehl your code worked very good, i replaced gray with the hex code (its #333) and everything is perfect now!

    Fantastic @dusanb17!

    Definitely look into CSS specificity. A note about that code, it will change ALL a tags under the .footer-wrap class. If that is the desired outcome then leave it as it is, but if you want other a tags to follow other colors or design schemes then perhaps look into :nth-of-type.

    Feel free to reach out for more help,
    Chris

    Thread Starter dusanb17

    (@dusanb17)

    No i wanted to change only that particular area, but its good to know for the future. Thanks for your advice i appreciate it!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘how to change clickable footer text color’ is closed to new replies.