posting ads under iframe - how to prevent overlapp?

Discussion in 'CSS' started by gilgalbiblewheel, Aug 8, 2007.

  1. #1
    I need to post ads under the iframe. But the iframe changes height as you navigate and it creates overlapping with the ads. How do you fix it?
    			#[COLOR="Red"][B]ifrindexdiv[/B][/COLOR] {
    				position: absolute;
    				left: 0px;
    				top: 0px;
    				<%'text-align: center;%>
    				margin: auto;
    				border: 0px;
    			}
    			#[COLOR="Magenta"][B]ifrindex[/B][/COLOR] {
    				position: relative;
    				left: 0px;
    				top: 0px;
    				width: 875px;
    				height: 1800px;
    				scrolling: none;
    				<%'border: double 2px #553C1D;%>
    			}
    
    
    							<div id="[COLOR="Red"][B]ifrindexdiv[/B][/COLOR]">
    								<iframe name="ifrindex" id="[COLOR="Magenta"][B]ifrindex[/B][/COLOR]" allowtransparency="false" src="forums/index.php" frameborder="0" scrolling="no"></iframe>
    							</div>
    Code (markup):

     
    gilgalbiblewheel, Aug 8, 2007 IP
  2. Silver89

    Silver89 Notable Member

    Messages:
    2,243
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    205
    #2
    Can you not use

    overflow:hidden;
     
    Silver89, Aug 8, 2007 IP
  3. gilgalbiblewheel

    gilgalbiblewheel Well-Known Member

    Messages:
    435
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #3
    No. I think that has to do with taking out the scrolling. But I tried and it resizes the iframe anyways.

    Could it be position? How about if I put position relative instead of absolute?
     
    gilgalbiblewheel, Aug 8, 2007 IP
  4. gilgalbiblewheel

    gilgalbiblewheel Well-Known Member

    Messages:
    435
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #4
    Ok What I did was to place the advertisement in the same div tag as the iframe. But the problem now is that since the iframe is long in height to make some of the pages to fit there are other times when it's short and the ad would remain way at the bottom.

    Is it possible to shrink the iframe when it doesn't need to be long in height?
     
    gilgalbiblewheel, Aug 8, 2007 IP