I’d like to embed an image or a div tag with a fixed width in the admin panel in order to set a minimum width. Something like this,
<div style="width:1000px; height:0px; border:0px;"></div>
I could not find a proper hook for it. This page http://codex.wordpress.org/Plugin_API/Action_Reference lists available hooks and I tried some of them including wp_before_admin_bar_render, wp_after_admin_bar_render. But it is too late to embed an image because #wpcontent is already loaded and rendered. I also tried admin_head but it is too early to embed an image; the width does not take any effect. I need to put the image before the div element of #wpcontent. I guess it’s after rendering the menu on the left.
Is it possible?
Specifying a width for #wpcontent directly in the stylesheet wasn’t successful in different WordPress versions. So I’m looking for alternatives. Thanks for your info.
It seems the problem was not the timing of when it is inserted but the style of the div tag. Since the purpose of this is to create a minimum width in the admin panel, the
border:0pxdoes not create a solid element. Therefore, the browser seems to ignore it.Inserting this worked.
This is the sample plugin which demonstrates how to do it.