Results 1 to 5 of 5

Thread: CSS Placement of Google Adsense on Right Hand Side?

  1. #1
    Join Date
    Oct 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default CSS Placement of Google Adsense on Right Hand Side?

    Hello All,

    I'm not too savvy with CSS, so please pardon if this seems uber easy.

    I have started to use Google AdSense on my web pages (Please see http://www.pwcparks.org/CalendarOfEv...6/Default.aspx), In Firefox, it shows the main content on the left hand side and the Ads on the right hand side in a columnar format, however, there is no word wrapping going on. In Internet Explorer, the AdSense shows at the top right and then below that my content starts.

    Here is what I have in my HTML in a single TD Cell:

    [div class="google120rightbanner"]

    [script type="text/javascript"][!--
    google_ad_client = "myAdSenseID";
    google_alternate_ad_url = "(Alternate Adsense URL)";
    google_ad_width = 120;
    google_ad_height = 240;
    google_ad_format = "120x240_as";
    google_ad_type = "text";
    google_ad_channel = "";
    google_color_border = "FFFFFF";
    google_color_bg = "FFFFFF";
    google_color_link = "0000FF";
    google_color_text = "000000";
    google_color_url = "008000";
    //--]
    [/script]
    [script type="text/javascript"
    src="(Javascript URL Location)"]
    [/script]

    [/div]

    [!-- Show my main content --]

    [div id="ContentPane" runat="server" style="padding-left:2px;"][/div]
    [!-- End my main content --]

    [div class="clear"][/div]


    This is what I have in my CSS:

    .google120rightbanner [
    width: 122px;
    margin: 15px 10px 5px 10px;
    float: right; /*allows main content to wrap around the google ad */
    /*note: after this we need to use the clear class to clear the float at end of container */
    ]

    .clear [
    clear: both;
    ]


    NOTE: I have changed the brackets so I can display this message on the forums.

    Does anyone have any idea what I am doing wrong here in getting the display I want using this CSS? Again, I'm not very savvy about this, so a good explanation would be helpful.

    Thank you all very much!

    Mark Gordon

  2. #2
    Join Date
    Mar 2007
    Location
    Tarboro, NC
    Posts
    290
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default

    Use the [ code ] [/ code ] tags, much easier . Ok, have you tried

    Code:
    position: absolute;
    right: 0px;
    I've not tested but, that might fix it (using it instead of what you have). I'm not sure if I understand though.

  3. #3
    Join Date
    Oct 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Interesting. This is what it looks like now in IE. (http://www.pwcparks.org/Recreation/B...3/Default.aspx)

    What I'm looking for is for the Ads to appear within my templated border, right next to my main content.

  4. #4
    Join Date
    Mar 2007
    Location
    Tarboro, NC
    Posts
    290
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default

    Its in there, I didn't view it earlier, so I have no clue what it looked like.

  5. #5
    Join Date
    Nov 2007
    Location
    Olympic Penninsula WA USA
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have never used:
    <div class="clear"></div>

    I use:
    <br class="clear" />

    That will clear anything from floating next to the floated div.

    ClaireP

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •