IE CSS issue with google ads

Discussion in 'CSS' started by brewmaster, Mar 11, 2009.

  1. #1
    I would like to align a standard google ad block (120x240) on either side of the video in this code. Works fine in Firefox, but in IE the ads are one on top and one below the video. I'll buy the first to fix it a beer.

    Here is the code (ad code removed):
    
      <div id="thevideo">
        	<div id="thevideoinside">
    		<div id="videoembed">    
    			(embedded video goes here)
    		</div>
        	</div>
       </div>
    
    Code (markup):
    And the css for this section:


    
    #thevideo {
    width: 100%;
    float: left;
    background: #0A0408 url(images/videobeerbgtop.jpg) top left repeat-x;
    padding: 15px 0 0 0;
    }
    #thevideoinside {
    width: 100%;
    float: left;
    background: url(images/videobeerbgbottom.jpg) bottom left repeat-x;
    position: static;
    padding: 0 0 15px 0;
    min-height: 350px;
    }
    #videoembed {
    margin: 0px auto;
    width: 650px;
    text-align: center;
    }
    
    Code (markup):

     
    brewmaster, Mar 11, 2009 IP
  2. nicolasthun

    nicolasthun Guest

    Messages:
    309
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you need to use float:left; for all 3 elements inside the #thevideoinside
    for the box and the two ads
     
    nicolasthun, Mar 11, 2009 IP
  3. brewmaster

    brewmaster Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    how can I then keep the 2 ads and video centered on the page? like <ad><video><ad>
    (thanks for the fast answer!)
     
    brewmaster, Mar 11, 2009 IP
  4. nicolasthun

    nicolasthun Guest

    Messages:
    309
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    to center something the box arround it should have margin: 0px auto;
     
    nicolasthun, Mar 11, 2009 IP
  5. brewmaster

    brewmaster Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    sorry - just realized my followup was a dumb question :) just needed to not use 100%

    thanks for the help nicolasthun! its beer time
     
    brewmaster, Mar 11, 2009 IP