Image & Adsense Block Alignment Issue

Discussion in 'HTML & Website Design' started by mtb, Oct 26, 2006.

  1. #1
    Hi all,

    I wish to experiment with images and different adblock formats. Typically, a 768 x 90 adblock is used in combination with 4 images and this is fairly easy to achieve as it is usually separate from any other content. For example, h--p://drawapig.desktopcreatures.com/images/adChange01.gif

    I am now trying to align an image above a single 234 x 60 adblock but finding it quite difficult. The image and adblock combo will actually be placed in the content with text. The text needs to wrap around both the the image and the adblock. Here is the code I have at the moment:
    <img src="image.jpg" width="234" height="119" border="3" align="right" />
      <div style="float:right;margin: 5px 5px 5px 5px;">
    
         <script type="text/javascript"><!--
    adsense code
    //--></script>
        <script type="text/javascript"
      src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
      </div>
    Code (markup):
    This doesn't work as the adblock displays to the left of the image and this is not what I want. I need the image to actually sit on top of the adblock.

    Any suggestions will be greatly appreciated. Thanks!
     
    mtb, Oct 26, 2006 IP
  2. missdanni

    missdanni Guest

    Best Answers:
    0
    #2
    missdanni, Oct 26, 2006 IP
  3. mtb

    mtb Peon

    Messages:
    79
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I was thinking of something more like this:

    [​IMG]

    Just a single ad unit partnered with an image, so I can align them to the right of my content section and wrap text around them.

    Hopefully that made it a little clearer.
     
    mtb, Oct 26, 2006 IP
  4. missdanni

    missdanni Guest

    Best Answers:
    0
    #4
    Oh ok, I gotcha now.

    Give this a try:

        <div align="right">image</div>
        <div>
          <div align="right">adsense</div>
    </div></div>
    Code (markup):
     
    missdanni, Oct 26, 2006 IP
  5. missdanni

    missdanni Guest

    Best Answers:
    0
    #5
    My Bad ..


    <div style="float:right;margin: 5px 5px 5px 5px;">
        <div align="right">image</div>
        <div>
          <div align="right">adsense</div>
    </div></div>
    </div>
    Code (markup):
     
    missdanni, Oct 26, 2006 IP
  6. mtb

    mtb Peon

    Messages:
    79
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    That works a treat. Thank you :D
     
    mtb, Oct 26, 2006 IP
  7. mtb

    mtb Peon

    Messages:
    79
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Your solution aligns the image the right which is great. Do you think it would be possible to somehow align the image in the center of the adblock?
     
    mtb, Oct 26, 2006 IP
  8. missdanni

    missdanni Guest

    Best Answers:
    0
    #8
    Yes just chanmge the
    <div align="right">image</div>
    to
    <div align="center">image</div>
    and that should do the job.
     
    missdanni, Oct 26, 2006 IP
  9. mtb

    mtb Peon

    Messages:
    79
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    That's awesome, thanks a lot missdanni!
     
    mtb, Oct 27, 2006 IP
  10. missdanni

    missdanni Guest

    Best Answers:
    0
    #10
    You're most welcome :)
     
    missdanni, Oct 27, 2006 IP