HTML - Xhtml Doctype Declaration Introduces A Small Space Between Two Images.
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. Similar TutorialsHello I have this weird problem with the following simple code HTML Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml' dir="ltr"> <head> <link rel="stylesheet" type="text/css" href="css/style.css"> <script src="includes/js/general.js" type="text/javascript"></script> <script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script> </head> Fire fox and chrome thinks that everything is fine, On internet explorer the stylesheet is not working When I take off the DOCTYPE it works in explorer as well what is my problem ? Thanks Lior I have virtually no understanding of doctype. I've never used it before, and I've never noticed a difference on any of my sites between different browsers or old and new browsers. But, recently, I've been trying to get up to standards on everything. All the tutorials and forums I've read about it say to use Transitional if you're not sure, and then they go on to say stuff about which version of HTML you're using. I really don't know exactly what XHTML is, but I do know (or at least think I know) that I always close out everything proper (<br /> instead of <br>, <img src="..." /> instead of <img src="...">, etc.), I always keep everything in lower case, and I always put properties in quotes. Is that the ONLY difference between HTML and XHTML? If so, should I use a Strict doctype instead of Transitional? My site looks fine on Mozilla, IE, Safari, and Opera, but w3.org keeps saying my pages are invalid, and it always points out my closing tags. Here's what I'm working on, in case anyone wants to see it http://www.gizburgduck.com/main/index.html I am combining 2 sets of code for my new website. I am combining my nold stuff with a piece of my new website. One piece is written in xhtml doctype traditional and the other is in xhtml strict. naturally I either lose the old part or the new parts. Is there a way to easily convert the traditional to strict, so the whole darn thing works right? 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! Hi there, I m using dom with css in my web page. Using the document type <!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"> My dom effect is not visible in mozilla 2.0. In stead if I am using the document type <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html xmlns="http://www.w3.org/1999/xhtml"> Is this vaild using w3c standards? Any help in this issue would be appreciable. Thanks in advance Hi there, I m using dom with css in my web page. Using the document type <!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"> My dom effect is not visible in mozilla 2.0. In stead if I am using the document type <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html xmlns="http://www.w3.org/1999/xhtml"> the dom effect is visible. Is this vaild using w3c standards? Any help in this issue would be appreciable. Thanks in advance Hi there. I'm just starting off in web design, and I am learning as I go along. I have been working on my site all day using Dreamweaver, but there is still one thing I am trying to do without success. Basically I have one Large image on a page, and I want to stack four smaller images vertically next to it on the right hand side. (shown in the attached image) I tried using a table, but all the boxes had the same dimensions. If I use margin to align the pictures, I cannot move the third picture underneath the small one. I realize I am going about this all wrong, but I have no clue as to how to achieve what I am trying to do. All I seem to find on the net is how to wrap text around an image. For example, here's what I did: Quote: <img src="images/Main Window Gallery1.png" width="517" height="395" border="0"><img src="images/small window1 gallery1.png" style="margin: 0px 0px 303px 25px;” width="132" height="92" border="0"><img src="images/small window1 gallery1.png"" height="92" border="0" align="absmiddle" style="margin: 0px 0px 180px 0px;” width=" valign="center"132> Any help is appreciated. Thank you. How do I make images small but when yoiu click them you go to a fullsize version? I have a fullsize image that takes up too much space on my webpage. What code should I use to shrink it a certain percentage but when I click on it you go to a full size image? thanks Ok I'd really like to design a darker them with a lot of textures like this one: http://www.grafpedia.com/tutorials/c...o-pixel-layout But thats just a photoshop walk-thru. So how would you go about making a background like the one shown with a couple of different textures without making just 1 large huge image? I'm worried about download times as I have my background image as a 1px image set on repeat. But if I choose to have a site design like shown in that link, I cant use the 1px image size option any more, or can I? Basically I'm lost as to how to get my site to look like the design in the link. Here it is now: http://acidtripmediaproductions.com/lmi/index.html I'd like to extend the main center div to go from the top to the bottom and "Frames" all the content within it Whats the easiest way to do that? Would I want to keep the side bar nav where its at if I do this? Look at the too pages. P1= http://chapai.net/xhtml_prob/html_smpl.htm Code: !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>html Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> ....................... P2= http://chapai.net/xhtml_prob/x_smpl.html Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>XHTML Sample</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> .......... P1 page is smooth but P2 page is not. Hare is white space at the uper side and lower side of the images. How to remove this space? Please Help. I have white space around my images with the grey border. I put in a picture that was larger than the previous cell size than removed it (the width and height code as well) but it still leaving the white space around the left and right sides of the images. http://www.diversink.com/publications.htm this is the page i'm working on Any ideas to why this is happening would be greatly appreciated Thank you, Rainseed I just started learning HTML from through Lynda.com. I ran into a problem of which I cant seem to find what went wrong. This image I horizontally splitted it in 3 parts which needed to resolve in HTML as 1 image. Between each image there now is a horizontal space. This is only the case in Firefox and Google Chrome. In Explorer it works fine. What did I do wrong? <table border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="images/1.gif" alt="" /></td> </tr> <tr> <td><img src="images/2.gif" alt="" /></td> </tr> <tr> <td><img src="images/3.gif" alt="" /></td> </tr> </table> Thank you. Whenever I use mouseover images on top of one another (in a column for example), there is always a small gap in between them. Is there anyway to get rid of this space? Even when I put border and vspace to 0 and even omit using a <br>, that annoying gap appears! Any suggestions? i am new, i found this site through google and seen how helpful everyone is and decided to join to try and find an answer. i got the design for the site from a template but i remade a majority of it and used photoshop to slice it. so heres the problem, the page is fine the way it is, but i need to be able to type in the white area. i dont know if a code exists to do such a thing but i attempted to will in the white area with a table instead of the image. please help me. thanks in advance. http://haskinsart.awardspace.com/index.html above is the page with the image as the white space (the body(where i want to type)) http://haskinsart.awardspace.com/indexart.html and this one has the table. but as u can see now i have gaps!!! please help me. Hi, I dont know much about SGML (its complicated and hard to find info on). I read this in the HTML 4 spec: Quote: Each markup language defined in SGML is called an SGML application. An SGML application is generally characterized by: 1. An SGML declaration. The SGML declaration specifies which characters and delimiters may appear in the application. 2. A document type definition (DTD). The DTD defines the syntax of markup constructs. The DTD may include additional definitions such as character entity references. 3. A specification that describes the semantics to be ascribed to the markup. This specification also imposes syntax restrictions that cannot be expressed within the DTD. 4. Document instances containing data (content) and markup. Each instance contains a reference to the DTD to be used to interpret it. HTML is a SGML application. So my question is; where is this so called "SGML declaration" specified in a typical valid HTML document with a prolog like: Quote: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> Is it in there?? Is it optional?? Thanks sam. Hi all, I'm having this website www.justmarch.nl When surfing directly to this site, a black screen is presented, after an F5 it's loaded correctly. Is this caused because for some reason there's a missing document type declaration? Thanx in advance for any help! Which one is better? XHTML STRICT 1.0 or XHTML 1.1 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 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. 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. |