How can I make Graphene's header widget fixed so it does not move when I scroll up or down?

  • ianizaguirre

    #7469

    How can I make Graphene’s header widget “fixed” so it does not move when I scroll up or down? Right now on my website it is an adsense text advertisement pushed all the way to the right but I want to know how to make it not move?

    Thank you

    O and just in case:

    Old thread where code I put on my site to make header widget move to the right can be seen

    Prasanna SP

    #38308

    It seems you got it resolved. But, beware of AdSense TOS. Google may not like it.

    ianizaguirre

    #38309

    That’s why I want it fixed so it does not violate the TOS. Its not moving on your page? mine moves when I scroll I want it so it does not move

    Mod

    Kenneth John Odle

    #38310
    Quote:
    That’s why I want it fixed so it does not violate the TOS.

    Actually, setting it to “fixed” can be interpreted as a violation of the TOS. That’s why you never see floating ads like this from Adsense.

    See this: http://support.google.com/adsense/bin/answer.py?hl=en&answer=1354736

    It’s a bit fuzzy, since you aren’t altering the ad code itself. However, you are altering the way in which it behaves. Additionally, while your ad placement may not cover any of your site’s content on your monitor, it may do so on narrower monitors. I would recommend against this idea.

    ianizaguirre

    #38311

    ok I will replace the text ad with something else but I want to know how I can make whatever I end up putting there not move when I scroll? any ideas ?

    Thank you for all the help

    Prasanna SP

    #38312
    Quote:
    but I want to know how I can make whatever I end up putting there not move when I scroll? any ideas ?

    position: fixed;

    ianizaguirre

    #38313

    this is what I have in my child theme

    /* formats header widget left position for location outside of content area on background*/
    #header-widget-left {
    position: fixed;
    top: 10px;
    left: 10px;
    }
    /* formats header widget right position for location outside of content area on background*/
    #header-widget-right {
    position: fixed;
    top: 10px;
    right: 10px;
    }
    /* formats header widget position general for location outside of content area on background*/
    .header-widget {
    position:fixed;
    top:10px;
    left:10px;
    }

    I have had position fixed this entire time yet it still follows the user when they move the page it does not stay “glued” in its position

    Prasanna SP

    #38314

    You confused me in the first post. In CSS, fixed position means what you have it now. The element will always be in a fixed position. So it will always show up (well, most of the times) regardless you scroll up or scroll down. So, you’ve to remove position: fixed from your CSS.

    ianizaguirre

    #38315

    sorry for confusing you

    I removed position fixed but now the Google Ad is just to the left on my header , no longer to the right but it is glued on the page, how do I get it glued on the page how it is now but to the right where it was before again?

    The code looks like this now with position fixed removed

    /* formats header widget left position for location outside of content area on background*/
    #header-widget-left {
    top: 10px;
    left: 10px;
    }
    /* formats header widget right position for location outside of content area on background*/
    #header-widget-right {
    top: 10px;
    right: 10px;
    }
    /* formats header widget position general for location outside of content area on background*/
    .header-widget {
    top:10px;
    left:10px;
    }

    ianizaguirre

    #38316

    I changed it to a be happy picture. How can I make it stay still and not move when I scroll?

    I put the css back to where it has position relative because when I took it off all it did was put the image over the header. Yes it remained still like I wanted it to BUT it was on the header, it Lost its position of being to the far right for some reason ?

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

You must be logged in to reply to this topic.