Space Above Iframe (Please help)

Discussion in 'HTML & Website Design' started by RogerDodgr, May 20, 2009.

  1. #1
    Hello, Can Someone please explain to me why there is a gap between the row of buttons near the top of the page and the iFrame directly beneath it. I want the buttons to sit right on top of the iFrame.

    thanks!


    
    <head>
    	<title>Multi-Search</title>
    	<script type="text/javascript">
    	<!--
    		
    		function wikipedia(form){
      			var f = form.input.value; 		
    			document.getElementById("1").innerHTML = "<iframe id='test' src ='" + " http://en.wikipedia.org/wiki/"  + f +   "' width='100%' height='480'></iframe>"
    		}
    	
    		function google(form){
      			var f = form.input.value;  
    			document.getElementById("1").innerHTML = "<iframe id='test' src ='" + "http://www.google.com/search?hl=en&q="  + f +   "' width='100%' height='480'></iframe>"
    		}
    		
    		//etc.
    		
    	       //-->
    	</script>	
    </head>
    <body>
    
    <FORM>
    	<INPUT NAME="input" VALUE="" MAXLENGTH="100" SIZE=20>
    	<INPUT NAME="calc" VALUE="Google" TYPE=BUTTON onClick=google(this.form)>
    	<INPUT NAME="calc" VALUE="Wikipedia" TYPE=BUTTON onClick=wikipedia(this.form)>
    
    	<!-- etc. -->
    	
    </FORM>
    
    	<div id = "1">
    	</div>
    
    </body>
    </html>
    
    
    Code (markup):

     
    RogerDodgr, May 20, 2009 IP
  2. misbah

    misbah Active Member

    Messages:
    265
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    68
    #2
    try this one
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html dir="ltr" lang="en">
    	<title>Multi-Search</title>
    	<script type="text/javascript">
    	<!--
    		
    		function wikipedia(form){
      			var f = form.input.value; 		
    			document.getElementById("1").innerHTML = "<iframe id='test' src ='" + " http://en.wikipedia.org/wiki/"  + f +   "' width='100%' height='480'></iframe>"
    		}
    	
    		function google(form){
      			var f = form.input.value;  
    			document.getElementById("1").innerHTML = "<iframe id='test' src ='" + "http://www.google.com/search?hl=en&q="  + f +   "' width='100%' height='480'></iframe>"
    		}
    		
    		//etc.
    		
    	       //-->
    	</script>
    	<style type="text/css">
    	form {padding:0; margin:0;}
    	</style>
    </head>
    <body>
    
    <FORM>
    	<INPUT NAME="input" VALUE="" MAXLENGTH="100" SIZE=20>
    	<INPUT NAME="calc" VALUE="Google" TYPE=BUTTON onClick=google(this.form)>
    	<INPUT NAME="calc" VALUE="Wikipedia" TYPE=BUTTON onClick=wikipedia(this.form)>
    
    	<!-- etc. -->
    	
    </FORM>
    
    	<div id = "1">
    	</div>
    
    </body>
    </html>
    Code (markup):
     
    misbah, May 20, 2009 IP
  3. RogerDodgr

    RogerDodgr Well-Known Member

    Messages:
    267
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #3
    misbah!
    Thankyou my freind.
     
    RogerDodgr, May 20, 2009 IP
  4. kashifmughal

    kashifmughal Member

    Messages:
    74
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #4
    thanks misbah, i was also finding solution regarding same problem, i really thankful to you.
     
    kashifmughal, May 20, 2009 IP