Opened 3 years ago
Last modified 3 years ago
#43244 new enhancement
Admin toolbar breaking full height layouts
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Toolbar | Keywords: | close |
Focuses: | Cc: |
Description
The Adminbar breaks full-height layouts by using margin on html
, but if we will replace _admin_bar_bump_cb
code with following:
<style type="text/css" media="screen"> html { padding-top: 32px !important; } @media screen and ( max-width: 782px ) { html { padding-top: 46px !important; } } </style>
that will work like before, but stops breaking full-height layouts, for example
html{height: 100%} body{min-height: 100%}
Change History (3)
#1
@
3 years ago
- Component changed from General to Toolbar
- Summary changed from adminbar to Admin toolbar breaking full height layouts
#3
@
3 years ago
I already do following:
add_action('get_header', 'fix_adminbar'); function fix_adminbar() { remove_action('wp_head', '_admin_bar_bump_cb'); add_action('wp_head', 'admin_bar_bump_cb'); } function admin_bar_bump_cb() { echo '<style type="text/css" media="screen"> html { padding-top: 32px !important; } @media screen and ( max-width: 782px ) { html { padding-top: 46px !important; } } </style>'; }
on all my sites.
Note: See
TracTickets for help on using
tickets.
Related: #30055, #42300
You can override the default toolbar styling if you theme doesn't work with it properly. To disable the default styling you can use: