Adsense in Header

  • Anonymous

    #3279

    I really tried to figure this out on my own, but have had a ton of issues. So on my test site, http://beta.mma-latino.com I want to have a smaller logo and then add Google Adsense to the header area. Here is what I have done. I have changed the size of the header image using a Child Theme and I have also enabled the header widget and pasted the text from Google in there. The problem I am having is that no matter what I do, the Ads come in over my logo. Take a look at the site and you will see that my logo loads and then Adsense comes up on top of it. I have tried various options including changing .header-widget options but nothing has worked.

    Here is my style.css for my child theme

    /*
    Theme Name: Graphene Child Theme
    Theme URI: http://www.mma-latino.com
    Description: Child theme for The Graphene Theme
    Author: Jose Madrid
    Author URI: http://www.mma-latino.com
    Template: graphene
    Version: 0.1
    */
    @import url("../graphene/style.css");

    #header{
    background-color:#F0F8FF;
    background-repeat:no-repeat;
    height:90px;
    margin-left:0px;
    width:232px;
    }
    .header-widget {
    position:fixed;
    top:10px;
    left:10px;
    float:right;
    }

    Here is my functions.php

    <?php
    function graphene_custom_header_width(){
    return 960;
    }
    function graphene_custom_header_height(){
    return 90;
    }
    add_filter('graphene_header_image_width', 'graphene_custom_header_width');
    add_filter('graphene_header_image_height', 'graphene_custom_header_height');
    ?>

    Anonymous

    #24197

    If you’ve entered 232px width in CSS, then it should be 232px width in the custom header function.

    function graphene_custom_header_width(){
    return 232;

    And adsense positioning,

    position: absolute;

    margin-left: 232px;

    float: left;

    jmadrid2

    #24198

    Prasanna,

    I have made the changes you described but still not getting the desired outcome.

    Functions.php

    <?php
    function graphene_custom_header_width(){
    return 232;
    }
    function graphene_custom_header_height(){
    return 90;
    }
    add_filter('graphene_header_image_width', 'graphene_custom_header_width');
    add_filter('graphene_header_image_height', 'graphene_custom_header_height');
    ?>

    For the adsense code, that would be the header-widget section of style.css correct?

    .header-widget {
    position: absolute;
    margin-left: 232px;
    float: left;
    }
    Mod

    Kenneth John Odle

    #24199

    @jmadrid2:

    Please place code between backticks. (Located on the “~” key on some/most computers.) Thanks!

    I don’t see a child theme loaded on your site. Did you upload it and activate it?

    Anonymous

    #24200

    Try,

    #text-3 {
    margin-left: 232px;
    }

    jmadrid2

    #24201

    I am making all changes on my beta site, http://beta.mma-latino.com and that is where you can see the problem.

    Mod

    Kenneth John Odle

    #24202

    Moved to Support. Please be sure to post in the correct section.

    Thanks for catching this one, Prasanna!

    Anonymous

    #24203

    @Ken, I saw the CSS loaded by the child theme.

    jmadrid2

    #24204

    Just applied the last change you gave me and it worked!!!! Thanks for your help. Why did that work?

    ~

    #text-3 {

    margin-left: 232px;

    }

    ~

    jmadrid2

    #24205

    Sorry about posting in the wrong place and using tilde instead of backticks.

Viewing 10 posts - 1 through 10 (of 13 total)

  • 1
  • 2
  • You must be logged in to reply to this topic.