Archived topic
Target breadcrums with .css
10 replies · Started by Bill on October 14, 2016
Hello,
I am trying to target the Yoast breadcrums with .css.
Here is what I have in the Inside Container hook:
<?php if ( ! is_front_page() ) : ?>
<div class="site-breadcrumbs">
<?php if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb('<p id="breadcrumbs">','</p>');
} ?>
</div>
<?php endif; ?>
In my Simple CSS, I have this
.site-breadcrumbs {
font-size: 14px;
}
Basically, I am trying to make the breadcrums a smaller font than the <p> text.
Any ideas would be appreciated!
Thanks!
Something like this might work better:
p#breadcrumbs {
font-size: 14px;
}
Thanks Tom,
I couldn't get that to work, either. I think there is something more going on. I can't seem to get anything but very basic .css (Like line height) to stick now for some reason.
I checked another site I just did and I could change the .css in Simple CSS, It worked perfectly but not in the one I am working on. They are pretty much identical.
For example, I could change the line weight for the Author name in comments for the previous site:
.comment-author cite {
font-weight: 300;
}
but not in the new site. The only difference is the server config.
Both are running PHP 7 and Maria DB. PHP-FPM is installed on the site I am having trouble with. I tried disabling all of the plugins. I set the wpconfig error to true and nothing came up. No caching and Varnish off.
Any ideas?
CSS can stop working if there's a syntax error in the document.
For example, if a part of my CSS is broken, everything below it won't be read.
You can run your CSS through a validator to find the issue: https://jigsaw.w3.org/css-validator/#validate_by_input
I tried that and it passed. I then tried just adding one at a time. The one code worked on one and not the other. I am going to spin up a new server to see if that is the cause.
If you can link me to the site I might be able to see why it's not working.
Where would you like me to send it? Is there a contact form?
Absolutely: https://generatepress.com/contact/
Thanks!
Just sent!
It was a bad .css tag I had that Tom figured out.
This theme rocks!!!
Thanks!
Glad I was able to help! :)