I'm developing an online store using wp e-commerce plugin.

Whilst working on it locally the problem didn't occur, but after I started testing it online a large gap began appearing before the top of the page. Using Firebug I've been able to see that the styling causing it is: html {margin-top: 28px !important; }

which firebug is telling me comes from a file that has the same name as the page ie: if example.com/products-page is the page being viewed it says that the style in question is being created by http://example.com/products-page on (line63)

I have used dreamweaver to search the entire wordpress folder locally for the style causing the error but it doesn't exist - it seems to be only occurring when the site is live online. I considered that possibly something could be getting added at a server level so I uploaded the site to an account on a different host - but same problem.

I'm using a reset.css file that would normally overcome this style being recognised - but than !important is what keeps it from being ignored.

Any insights or suggestions greatly appreciated


This is almost surely your problem Wordpress Admin Bar ..

  • thanks for the help, I'll discuss implementing the css and coding suggestions suggested in that article. May 3 '11 at 17:01

Could it be that you're logged in to the WordPress admin panel? The new WordPress admin-bar adds some css to the header:

<style type="text/css" media="print">#wpadminbar { display:none; }</style>
<style type="text/css">
    html { margin-top: 28px !important; }
    * html body { margin-top: 28px !important; }
  • Thank you so very much - problem solved. I'm just guessing I didn't see it during development on localhost as it's running a slightly older version of wordpress that doesn't include that navigation bar. Thanks guys for your help - greatly appreciated May 3 '11 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.