HTML - Help: Extra Space Between Iframe And Div Caused By Doctype
I'm trying to place a DIV directly below an IFRAME with no space inbetween.
Please see this sample page: http://www.esaba.com/space.html When viewed in Firefox, there is an extra space between the IFRAME and the DIV. If I remove the DOCTYPE, it displays correctly. This is for a webpage widget I am developing which writes the IFRAME and DIV into the page through javascript. Because the widget will be placed on many different pages which I don't have control over, it needs to look the same (with no space) regardless of the DOCTYPE or other attributes. Please help me figure out how to remove the extra space. Thanks! Similar TutorialsHello, Im making my navigation bar with a mouse over effect on the buttons. however im getting "extra space" under the command. A blank page can be seen at saracrew.org/blank.html Any help is greatly appricated, Thanks! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>SARAcrew.org</title> <link rel="stylesheet" type="text/css" href="general.css" /> </head> <body bgcolor="505769" leftmargin=0 topmargin=0> <table border="0" cellspacing="0" cellpadding="0" bgcolor="505769"> <tr><td colspan="4"> <table border=0 cellpadding=0 cellspacing=0> <tr> <td colspan="4"><img src= "images/banner1.jpg" alt="banner" /></td> </tr> <tr> <td><table border=0 cellpadding=0 cellspacing=0> <td><img src= "images/left_vbar_nav.gif" alt="vbar" /></td> <td> <table border=0 cellpadding=0 cellspacing=0> <tr><td><img src= "images/nav_bar_1.gif" /></td></tr> <tr><td><a href=home.html><img src="images/home_off.gif" onmouseover="this.src='images/home_on.gif'" onmouseout="this.src='images/home_off.gif'" border=0 /></a> </td></tr> <tr><td><img src= "images/nav_bar_2.gif" /></td></tr> <tr><td><a href=news.html><img src="images/news_off.gif" onmouseover="this.src='images/news_on.gif'" onmouseout="this.src='images/news_off.gif'" border=0 /></a> </td></tr> <tr><td><img src= "images/nav_bar_3.gif" /></td></tr> <tr><td><a href=results.html><img src="images/results_off.gif" onmouseover="this.src='images/results_on.gif'" onmouseout="this.src='images/results_off.gif'" border=0 /></a> </td></tr> <tr><td><img src= "images/nav_bar_4.gif" /></td></tr> <tr><td><a href=board.html><img src="images/board_off.gif" onmouseover="this.src='images/board_on.gif'" onmouseout="this.src='images/board_off.gif'" border=0 /></a> </td></tr> <tr><td><img src= "images/nav_bar_5.gif" /></td></tr> <tr><td><a href=pictures.html><img src="images/pictures_off.gif" onmouseover="this.src='images/pictures_on.gif'" onmouseout="this.src='images/pictures_off.gif'" border=0 /></a> </td></tr> <tr><td><img src= "images/nav_bar_6.gif" /></td></tr> <tr><td><a href=orange_oar.html><img src="images/orange_oar_off.gif" onmouseover="this.src='images/orange_oar_on.gif'" onmouseout="this.src='images/orange_oar_off.gif'" border=0 /></a> </td></tr> <tr><td><img src= "images/nav_bar_7.gif" /></td></tr> <tr><td><a href=dues.html><img src="images/dues_off.gif" onmouseover="this.src='images/dues_on.gif'" onmouseout="this.src='images/dues_off.gif'" border=0 /></a> </td></tr> <tr><td><img src= "images/nav_bar_8.gif" /></td></tr> <tr><td><a href=info.html><img src="images/info_off.gif" onmouseover="this.src='images/info_on.gif'" onmouseout="this.src='images/info_off.gif'" border=0 /></a> </td></tr> <tr><td><img src= "images/nav_bar_9.gif" /></td></tr> <tr><td><a href=email.html><img src="images/email_off.gif" onmouseover="this.src='images/email_on.gif'" onmouseout="this.src='images/email_off.gif'" border=0 /></a> </td></tr> <tr><td><img src= "images/nav_bar_10.gif" /></td></tr> </table> </td> <td><img src= "images/right_vbar_nav.gif" alt="vbar" /></td> </table></td></tr> </table> </td> </tr> </table> </td></tr> </table> </body> </html> Hi all, I have a HTML document, with two images one below the other e.g. <img id="Image1" src="web/images/en/1.jpg" alt="Image"/><br/><img id="Image1" src="web/images/en/1.jpg" alt="Image"/> To make my doc XHTML compliant, i am adding following doctype declaration in my doc: <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> But because of the above declation, there is a minor gap observed between the images, if i remove the Doctype declaration, the space disappears. Can somebody help me on this, is there any workaround to resolve the same or what could be the probable reason for this behavior. Hi everybody! I'm doing a page and IE keeps putting more space in between table cells than I have specified. Here's the link: http://renewforest.com/test The page is basically a table in a div layer, I have made the table have a 2px cellspacing, it works great for the top 3 cells but puts a few pixels after these first 3 cells, destroying my nifty 2 pixel separation. Also, I have given some cells (the td.topfade attributed ones that is) some left and right padding, BUT NO TOP PADDING, yet Safari and Firefox both put in some padding on the top. Oddly enough, IE obeys the CSS'ed padding, huh. Any ideas? Thanks in advance! (Because this also deals with CSS I am posting this to the CSS section as well, if this is a big no no please let me know.) My site name is juicersuperstore.com, I have an image right in the center of the site but there is extra blank space on top and at the bottom of the image and I have tried desperately to fix that but I ave not been able to. From the page source, the area with the blank space looks like this <td width="100%" valign="top"> <table border="0" width="100%" cellspacing="0" cellpadding="1"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr><td><div align="center"><img src="images/Template-1_21.jpg" alt="" border="0"></div> </td></tr> <tr> <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td> </tr> <tr> <td class="mphead"><!-- D Main_page //--> <img alt="shop for juicers for low low prices" border="0" height="330" src="http://www.juicersuperstore.com/images/frontpic.jpg" title="juice superstore" width="520" /><img alt=" " border="0" src="https://www.juicersuperstore.com/admin/" /> <!-- Main_page eof //--> </td></tr> <tr> <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td> </tr> The middle image name is frontpic.jpg, please any help would be very appreciated. Thanks I have built a table and it is doing something strange and I would like to know why. It is creating an extra line of blank space before displaying the text in a cell. This cell is within a table that is nested within another table. It's strange because it only has this behavior in Firefox, but not in IE. When I remove this nested table and put it in an HTML file all by itself, the behavior goes away, and the text butts up against the top of the cell like it is intended. The cell in question has nothing but text within it. If I take the original HTML file away from the style sheet it's linked to and away from all the images associated with it, and simply paste the HTML file to my desktop and open it, the blank line is still there. One other thing that is strange to me--when I open the "naked" file from my desktop in IE, IE creates placeholders for all the missing image files so I can see what's going on. When I open the file in FireFox, there are no placeholders, but rather it just recreates the table and shrinks it as if the images are not even there. I'm not exactly sure what code is creating the blank line, otherwise I would post it. So short of pasting in my entire HTML document, I thought I'd describe it and see if anyone has any ideas or may be able to give me some clues. If none of this does any good without the code in question, I'd be happy to post some. Thanks! Everything else has been great there is just one problem Mozilla Firefox shows it the way it should but IE keeps showing extra white space on top of my menus. Explain why this is and give me a solution and I know that negative margins is not the right solution so don't suggest that . thanks, Hi, I'm coding a HTML page, in which I see lot of space between my header(<h2></h2>) and the contents of the page. The contents of my page happens to be a form with a lot of fields enclosed in the table tag.. Any pointers on how to get rid of the extra space would be highly helpful. this is how the structure of my HTML code looks: <html> <body> <form> <table> <!-- a lot of fields here...--> </table> </form> </body> </html> Thanks in advance. For some reason, I have a lot of extra space at the top of my page. What could be causing this and how do I fix it? Hi, I'm having a problem with internet explorer and I don't know how to fix it... See the website I'm working on... In Firefox everything is fine...But in Explorer (version 7) you can see a gap below the main horizontal menu (extra white space of 2 or 3 pixels)...And there is also a 1 pixel gap on each side of the web site (see the vertical lines). What can cause that? Is there a way to fix this? Thanks in advance.. I did a test : I created a html file with only a small part of the code and the problem is still there...You can take a look at this test he test2 hello, i have a html code with an horizontal flash menu containing 6 flash buttons. the code is like this HTML Code: .....<td width="790" height="30" colspan="2" > <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="131" height="30" > <param name="movie" value="2.swf" /> <param name="quality" value="high" /> <embed src="2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="131" height="30"></embed></object> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="131" height="30"><param name="movie" value="3.swf" /> <param name="quality" value="high" /> <embed src="3.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="131" height="30"></embed> </object>..... ... the other 4 flash buttons when i run IE everything is ok but in opera there is an extra space between every 2 flash buttons and i really dont know where that came neighter how to remove them.. thank you, is the first time i enter this forum and it really looks great.my best regards to admins. So often when I create a form, a simple form with one text box the form tag adds a bunch of space below when I want it "lean" with zero space. For example a table row... <table> <tr bgcolor="#ffcc33"> <td valign="top" align="left" width="25%"></td> <td valign="top" align="center"><form action="http://www.sanluisshopper.com/search_businesses.php" method="GET" name="search"><input type="Text" name="search" size="20" name="search"><input type="Submit" value="Shop!"></form> </td> <td valign="top" align="right" width="25%"></td> </tr></table> Is there any way to eliminate this extra space? This has driven me batty! Thanks. Hi Experts, I have an Iframe on a simple page. I am seeing an usual big white space between the header and the Iframe in Internet Explorer.. Same link is working fine on Firefox. how do i make it work in IE as well. PS: I have attached the snapshot of page. Code: <html> <head> <style type="text/css"> @import url("/analytics/static/styles/intranet.css"); /* main stylesheet */ @import url("/analytics/static/styles/intranet-2col.css"); /* column stylesheet */ @import url("/analytics/static/styles/intranet-2col-1024.css"); /* 1024px stylesheet */ </style> <script language="JavaScript" src="/analytics/static/Fusion/FusionCharts/FusionCharts.js"></script> <title>Test</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta name="GENERATOR" content="Rational Application Developer"> </head> <body> <div id="page-wrapper"><%@include file="Header.jsp"%> <div id="column-wrapper"><!-- begin columns --> <%@include file="NEW_TOOLBAR.jsp"%> <div id="content"><!-- begin content column --> <div class="inner"> <iframe src="chart.html?chartType=${detailForm.chartType}&chartGroup=${detailForm.chartGroup}&chartSubgroup=${detailForm.chartSubgroup}&liabilityCode=IRU&timeline=${detailForm.timeline}&width=600&height=400" frameborder="0" scrolling="no" width="700" height="430" align="top"></iframe> <p><small> </small></p> </div> <!-- end content column, then column wrapper --></div> </div> <%@include file="Footer.jsp"%></div> </body> I had found this, but no idea how to fixed it. http://www.milw0rm.org/exploits/1775 Kindly help. Thanks. Hello, I hired contractors to build a site for me. The site's front page has a small section for text, the developers added some placeholder text in this spot. Now that the site is completed, I changed the text as follows: I downloaded the index.php file from my webhost. I changed it to a txt file, then opened in notepad, found the placeholder text, changed it, saved the file, renamed the file back to php, then uploaded to webhost, replacing old index.php file. When I load the page the following error message appears twice at the top of the window: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/XXXX/public_html/index.php:1) in /home/XXXX/public_html/index.php on line 2 Does anyone know what this error indicates ? (I'm not a programmer) I did not save the old index.php file because I didn't think such a minor change would cause problems. The contract with my developer has ended and I don't want to start a new one for this. Any help appreciated. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> this line seems to be at war with firefox. for some unknown reason my banner has a space between the lower body (it shouldn't). It is fine in IE and fine if the above line is not included. It seems to be adding some sort of padding into the table cells where the images are, somehow because of the domument type. ---------- Anyone have any solutions? LINK: http://uniden.zzl.org/ Again it is FINE in IE, but not if FF. HTML is Valid according to W3c Validator. Thanks in advance How improtant is the doctype tag? I am trying to teach myself html and am trying to figure out when to use what doctype. DOCTYPE basically tell the web browser what to expect when interpreting the html doc b/c html has been revised over the years, is that correct? Can someone please help me understand how to properly use the doctype tag and what is smart choice/ example of a specific doctype tag is and the reasoning behind why 'this' doctype tag is a smarter choice than an alternate doctype tag? Thank you! -Matt H. When I add a doctype it completely ruins my whole page layout. How can i fix this? Without: it fits my whole page and looks nice. With doctype: it squishes everything to the top. Help please. I have a doctype problem on my site which I cannot get rid of... Im using utf-8 have tried the below: !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> !DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> --> !DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Many things are happening and I have read a lot of docs handling this... What do you suggest that I do? (Hmmm, - I need dansih characters... ) (In mysql working on the site I cannot see the correct characters... A workaround are being used...) Regards, Frank I'm trying to re-do and validate all my 100+ websites; this one is the most recent: http:// www.sticksite.com/cook/indexNEW.html and after "Tidy" cleaned it up I now have the very top looking like this which I know is not right: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> --> <html> <head> <meta name="generator" content="HTML Tidy for Linux (vers 1 September 2005), see www.w3.org"> <meta content="text/html; charset=utf-8" http-equiv="content-type"> <title>Fast, nutritious meals</title> My pages are nothing fancy, I just want them to work. "Transitional" is fine; I'm not worried yet about "Strict." I'm validating at http://validator.w3.org/ Can one of you super HTML specialists please tell me how the top of my pages SHOULD look? Many thanks in advance! |