[ad_1]
I’m trying to add some custom CSS to the postbox container when editing a page. I’m new to this kind of thing so here’s my code that isn’t working:
​
add_action( ‘admin-head’, ‘fixed_postbox_css’ );
function fixed_postbox_css() {
echo ‘<style>
#post-body.columns-2 #postbox-container-1 {
position: fixed;
overflow: scroll;
float: none;
margin-right: 0px;
right: 20px;
max-height: calc(100vh – 182px);
}
</style>’;
}
Any advice would be appreciated.
[ad_2]
Do you want to add css to the postbox on WP dashboard?
Or On the Webpage you created using WP
Just realized I did ‘admin-head’ and not ‘admin_head’ 🤦🏼♂️