1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

CSS, Divs and Adsense

Discussion in 'CSS' started by sarahk, Nov 7, 2005.

  1. #1
    On my new site I've got the body being setup by Divs (out of the box which is nice) but the div isn't able to respond to the size of the Google Ad which means the ad often hangs down rather than stretching the div: example.
    SEMrush
    How do I work around this - only thing I can think of is to put the ad inside a div which is set to the ad height.
     
    sarahk, Nov 7, 2005 IP
    SEMrush
  2. Arnica

    Arnica Peon

    Messages:
    320
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi Sarah

    Add <br style="clear:both"> just before your .main <div> closing tag. That should do the trick.

    Mick
     
    Arnica, Nov 7, 2005 IP
    sarahk likes this.
  3. sarahk

    sarahk iTamer Staff

    Messages:
    26,674
    Likes Received:
    4,039
    Best Answers:
    115
    Trophy Points:
    665
    #3
    Thank you, that worked perfectly!
     
    sarahk, Nov 7, 2005 IP
  4. Roze

    Roze Guest

    Messages:
    403
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yikes I searched the web for hours for this solution and something made me try the DP forums search. Thank you it works like a charm!
     
    Roze, Nov 8, 2005 IP
  5. sarahk

    sarahk iTamer Staff

    Messages:
    26,674
    Likes Received:
    4,039
    Best Answers:
    115
    Trophy Points:
    665
    #5
    sarahk, Nov 11, 2005 IP
  6. Arnica

    Arnica Peon

    Messages:
    320
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hi Sarah

    To float alongside your #promo <div> would need to come before the .detailsborder <div> in the source.

    Mick
     
    Arnica, Nov 11, 2005 IP
  7. just-4-teens

    just-4-teens Peon

    Messages:
    3,968
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #7
    dunno if its me but ur site looks messed up in FF, the big div starts and ends, then the one on right (which i assume is suppose to be alongside) starts after the big one finishes.
     
    just-4-teens, Nov 11, 2005 IP
  8. sarahk

    sarahk iTamer Staff

    Messages:
    26,674
    Likes Received:
    4,039
    Best Answers:
    115
    Trophy Points:
    665
    #8
    My point exactly.

    The reason for the change was to move the html for one section higher on the source and the tutorials I'd seen had implied this was straight forward (despite experience warning me it wouldn't be).

    I've changed it to let #promo float to the left and still it floats lower

    Using various tools with firefox I can see that I have #main and it has 3 containers: #promo, #realstate and a clear and everything is held within them.

    In firefox they look separate and in IE it looks like #promo is IN the #realstate container.

    very frustrating - I hear tables beckoning but I know that's not the right answer ;)
     
    sarahk, Nov 11, 2005 IP
  9. just-4-teens

    just-4-teens Peon

    Messages:
    3,968
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #9
    hmmm im a little tired so a bit stupid at the moment and not sure what your trying to achieve however are you trying for something like i have on my site div on top left with adsense, div on bottom left with copyright & disclaimer and main div in center?
    feel free to view sorce/css file to view how i have it layed out or wotever
     
    just-4-teens, Nov 11, 2005 IP
  10. sarahk

    sarahk iTamer Staff

    Messages:
    26,674
    Likes Received:
    4,039
    Best Answers:
    115
    Trophy Points:
    665
    #10
    I gave up and used some code from Blue Robot: http://www.bluerobot.com/web/layouts/layout2.html which annoys me because
    • I don't totally understand it
    • It has "hacks" in it
    • My page appears to have two parts instead of being integrated
    On the other hand, it works! So that's something... :)

    thanks for the replies...
     
    sarahk, Nov 11, 2005 IP