GoogleAds won't allow my site to be centered

Discussion in 'CSS' started by 5thround, Sep 13, 2007.

  1. #1
    I'm still learning all the CSS stuff, but ever since I put GoogleAds on the right side of my site, it won't allow my site itself to center. Anyone have any ideas? Thanks. http://www.5thRound.com

    or just click on the signature link.
     
    5thround, Sep 13, 2007 IP
  2. le007

    le007 Well-Known Member

    Messages:
    481
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #2
    Hey 5thround,

    is the google ads part of the main div and/or container?
    If so then theres a few ways around it but I'd need to know...
    Is it in its own div? Is there a margin-left setting etc...
     
    le007, Sep 13, 2007 IP
  3. 5thround

    5thround Active Member

    Messages:
    126
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #3
    I put it in it's own DIV called "GoogleAds" I believe, I did it that way so I could control it better, but it's not apart of the table (which is where my main site is) it's on it's own completely.
     
    5thround, Sep 13, 2007 IP
  4. le007

    le007 Well-Known Member

    Messages:
    481
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #4
    I have never used google ads - are they beneficial?

    A simple fix to your problem however is: since your page is done using tables, you could include it in the table - this would be easier though.

    Simple set the margin-left: to say 99px and that should push the div to the right of the entire table.
     
    le007, Sep 13, 2007 IP
  5. 5thround

    5thround Active Member

    Messages:
    126
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #5
    The thing is that the ad is it it's own div, so you're saying to just add another column to the table?
     
    5thround, Sep 13, 2007 IP
  6. le007

    le007 Well-Known Member

    Messages:
    481
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #6
    Thats the messy way of doing it -

    Go into your googleads div and add this:

    margin-left: 99px;

    Save and refresh
     
    le007, Sep 13, 2007 IP
  7. 5thround

    5thround Active Member

    Messages:
    126
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #7
    tried that, all it did was move the main section of my site more to the left for the google adsense thing, this is my css code for it:

    .adsense {
    	float:right;
    	margin-left:99px;
    	padding-top:180px;
    	padding-right:100px;
    }
    Code (markup):
     
    5thround, Sep 13, 2007 IP
  8. 5thround

    5thround Active Member

    Messages:
    126
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #8
    Nevermind, played around with the code and got it looking good now.

    Good call man, thanks for the tip.
     
    5thround, Sep 13, 2007 IP
  9. le007

    le007 Well-Known Member

    Messages:
    481
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #9
    You've way too much padding-right. Take that out totally as your div will automatically site to the right of the table. Thats probably the problem right there! Glad its good :)
     
    le007, Sep 13, 2007 IP
  10. 5thround

    5thround Active Member

    Messages:
    126
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #10
    Yup, got it... I'll let you know how the AdSense thing works out, I just started using it. Some people benefit from it, some don't... We'll see.
     
    5thround, Sep 13, 2007 IP