Archived topic
CSS for moving down sidebar?
12 replies · Started by gedosan on March 6, 2018
HI
Since adding the breadcrumb I need to shift the right hand sidebar down a few pixels so it lines up with the main container. Could you tell me the CSS to use please?
Thanks!
It might be better to add the breadcrumb code into the "After Header" hook. That will push both the content and sidebar down the same amount.
Let me know if you need more info :)
Interesting - added it to “After Header” hook and its completely disappeared?!
Remove the negative margin you added here:
.grid-container.yoast-breadcrumb {
margin-top: -20px;
margin-bottom: 15px;
font-size: 14px;
}
all sorted - any way i can exclude from the homepage?
In your hooks, do this:
<?php if ( ! is_front_page() ) : ?>
Your code here
<?php endif; ?>
sorry man, do i need to stitch these together then?
<?php if ( function_exists('yoast_breadcrumb') ) : ?>
<?php endif; ?>
<?php if ( ! is_front_page() ) : ?>
Your code here
<?php endif; ?>
What's the exact code you have in there now? It should include a grid-container etc..
Let me know and I'll tweak it for you :)
here you go cheers:
<?php if ( function_exists('yoast_breadcrumb') ) : ?>
<?php endif; ?>
Hmm, seems to be missing some HTML I see on your site.
Either way, you would do this:
<?php if ( function_exists( 'yoast_breadcrumb' ) && ! is_front_page() ) : ?>
<?php yoast_breadcrumb( '<p id="breadcrumbs">','</p>' ); ?>
<?php endif; ?>
gone from home page (cool), but looks a bit messed up now (over to the left and missing CSS by looks of it) on other pages
dont worry fixed now...thanks!
Sounds like the missing container stuff I mentioned. Glad you got it working! :)