html - 100% hieght in the wordpress container on the backend only with css -
wordpress has html structure in backend...
<!doctype html> <html ...> <head> ... </head> <body class="wp-admin ..."> ... <div id="wpwrap"> <div id="adminmenumain" role="navigation" aria-label="main menu"> ... <div id="adminmenuback"></div> <div id="adminmenuwrap"> ... </div> </div> <div id="wpcontent"> ... <div id="wpbody" role="main"> <div id="wpbody-content"> <div id="screen-meta" class="metabox-prefs"> ... </div> <div class="myplugin"> ... </div> </div> </div> </div> <div id="wpfooter" role="contentinfo"> <p id="footer-left" class="alignleft"> ... <div class="clear"></div> </div> </div> </body> </html>
by default #wpwrap has 100% of height , problem need #wpcontent, #wpbody , #wpbody-content 100% height, because plugin (.myplugin) has inside sidebar , area content need both 100% of height too...
i've tried several things... table-cell #adminmenumain breaks , don't want touch things outside of #wpcontent... position absolute... #wpfooter breaks if have scroll in myplugin
probably few lines of jquery resolve problem, want css
maybe wordpress installed, inspecting little bit code give me suggestion ... thank much!
use min-height: 100vh;
, modern browsers support them, except opera mini browser. https://caniuse.com/#search=vh
however may provide fallback browsers not support viewport-relative lengths using old “height: 100%
” option. working. add little bit:
html, body{ height:100%; }
Comments
Post a Comment