Change color of SiteTitle and Menu in different pages
-
Hello!
I would like to change the color of my site title and menu to white only in the FrontPage and keep it black at the rest of the website. this is the site i'm working on. www.victorcatala.com
Thank you very much!
-
My fix for this is to insert HTML in the homepage
(in the page editor [ + MORE ] > [ + HTML ] ), place it where ever you wan't in the pagewith this code :
.sitetitle, .primary a {color:white !important;} nav.primary a span {border-bottom-color: white !important;}
or this code if you wan't to exclude the phone theme :
@media (min-width: 900px) { .sitetitle, .primary a {color:white !important;} nav.primary a span {border-bottom-color: white !important;} }
of course instead of "white" insert the color you want
-
Thanks for your answer Rsepierre! But it didn't work to me :(
www.victorcatala.com
-
hey man @rsepierre thanks for that answer. Yes it is almost perfect.
Look, you can use css based on which current page you are on:
http://laytheme.com/documentation.html#css-based-on-current-pageSo if your frontpage had a "slug" of "frontpage" then you would use:
body.slug-frontpage .sitetitle.txt, body.slug-frontpage .tagline, body.slug-frontpage nav.primary a{ color: white; }
You'd put it in "lay options" -> "custom css & html" -> "custom css for desktop"
-
@arminunruh Ah cool, it is better ! Didn't know we could do this, so i will use it on mine too !
@paubo yes sorry what i said couldn't work because a bit of code was missing to what I said, you should have added <style></style> like so :
<style> .sitetitle, .primary a {color:white !important;} nav.primary a span {border-bottom-color: white !important;} </style>
BUT
you should defenitly use armin's solution now !
-
@arminunruh Thank you for the anwser! I didn't see that before.
Finally it works with this.body.slug-about span{
color: white; }
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it