Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have created a child theme in the Genesis framework. I have created all of my style rules, however, in the markup, Genesis adds a few inline rules by default that I would like to eliminate.

The rules look like this:

<style type="text/css" media="screen">
    html { margin-top: 28px !important; }
    * html body { margin-top: 28px !important; }
</style>
<style type="text/css">
    #header { background: url(http://localhost/h.jpg) no-repeat; }
</style>

These inline styles are creating my last remaining problem. I've reviewed the docs and tried to find if there are any hooks or parameters that I can alter, but have not found any.

How can i get rid of them across the entire child theme?

Many thanks.

share|improve this question
add comment

4 Answers

Add a class on header.php

<html <?php language_attributes(); ?> class="top">

and add css on style.css

.top{
    margin:0px !important;
    padding: 0px !important;
}
share|improve this answer
add comment

The best way I've found to remove that white space (it's not caused by the admin bar) is to search out this css in style.css:

page {

margin: 2em auto;
max-width: 1000px;

}

and switch the 2em to 0em or some variation of the same. That will remove the white space.

share|improve this answer
add comment

Just comment out what you dont want by adding /* and closing it with */ like this

<style type="text/css" media="screen">
/*html { margin-top: 28px !important; }
 html body { margin-top: 28px !important; }*/
</style>
<style type="text/css">
/*#header { background: url(http://localhost/h.jpg) no-repeat; }*/
</style>

Notice how they become grey and inactive

share|improve this answer
    
genesis does not expose CSS in the traditional matter, so simply commenting it out is not possible. My goal is to determine how to disable the functionality. –  HumanBacon Jul 12 '12 at 22:56
add comment

The first inline CSS is added by WordPress automatically when you are logged in and viewing the front end. It is part of the CSS for the WordPress adminbar.

<style type="text/css" media="screen">
 html { margin-top: 28px !important; }
* html body { margin-top: 28px !important; }
</style>

For the second part of the inline CSS I would check around in Genesis for add_action('wp_header' ..

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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