#6159
Vladimir
Keymaster

Hi Tobias,

jQuery .css( propertyName, value) method allows to change CSS of selected element on the fly (official documentation page),
Like this:


jQuery('.html_header_top.html_header_sticky').css('padding-top', 0);
jQuery('#top').css('padding-top', 0);
...

It’s possible to work with clear CSS also:


// Additional options for URE

// Hide parts of front-end page for selected role
add_filter( 'ure_role_additional_options', 'ure_add_change_front_end_css', 10, 1 );

function ure_add_change_front_end_css( $items ) {
    
    $item = URE_Role_Additional_Options::create_item( 'change_front_end_css', esc_html__('Change Front-end CSS', 'user-role-editor'), 'wp_head', 'ure_change_front_end_css' );
    $items[$item->id] = $item;
    
    return $items;
}

function ure_change_front_end_css() {

?>
<style>

.html_header_top.html_header_sticky #top #wrap_all #main {
    padding-top: 0px !important;
}
    
    
</style>
<?php
}