Forum Moderators: open
<!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" xml:lang="en" lang="en">
the above doctype is what i used and all my pages are valid but my template is not displaying properly on netscape but its fine on IE.
Any suggestions will be greatly appreciated
These often sneak into documents in unexpected places and cause small gaps. Standards compliant mode is more likely to render them than 'quirks' mode.
e.g.
<img src="pic.gif">
<img src="pic2.gif">
actually creates pic.gif, followed by a space, followed by pic2.gif.
To avoid this you must avoid using whitespace where it is not intended to appear. e.g.
<img src="pic.gif"><img src="pic2.gif">
would render the two pics next to each other with no space.
I have noticed this also. I never found a fix. Netscape 6 and above seems to render differently if you use a doc type. I chalked it up to just an implementation bug in netscape. If someone knows a fix or the cause I would like to here it.
It is not a bug - Mozilla / Netscape 6+ does
DOCTYPE sniffing to adapt its rendering mode to whether the page is "tag soup" or standards-compliant HTML/XHTML. Try these links: [mozilla.org...]
[mozilla.org...]
[mozilla.org...]
The problem described in the original query will certainly be due to the change in rendering mode when you add a valid
DOCTYPE.
<!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" xml:lang="en" lang="en">
<head>
<!-- #BeginTemplate "/Templates/isplayout.dwt" -->
<!-- #BeginEditable "doctitle" -->
<title>assignments</title>
<!-- #EndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="Title" content="University of Houston Libraries" />
<meta name="Description" content="assignments" />
<meta name="Keywords" content=" houston, libraries, library, university, information services, library instructions,information literacy" />
<meta name="Author" content="University of Houston Libraries" />
</head>
<body bgcolor="#FFFFFF" text="#000000" >
<table width="643" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" align="left" height="80">
<p><img src="http://lib-04.lib.uh.edu/lib/INFOSERV/libinstruc/images/layoutdesign_01.jpg" width="641" height="80" border="0" usemap="#layout_design"alt="template"/></p>
</td>
</tr>
<tr>
<td valign="top" align="left">
<table width="643" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top" width="136"><img src="http://lib-04.lib.uh.edu/lib/INFOSERV/libinstruc/images/website-template_02.jpg" width="112" height="641" border="0" usemap="#template" alt="template" /></td>
<td align="left" valign="top" width="507">
<table width="508" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" height="18"> </td>
</tr>
<tr>
<td valign="top" height="1083"><!-- #BeginEditable "writingsection" -->
<td valign="top" align="left" height="80">
<p><img src="http://lib-04.lib.uh.edu/lib/INFOSERV/libinstruc/images/layoutdesign_01.jpg" width="641" height="80" border="0" usemap="#layout_design"alt="template"/></p>
</td>
Try dropping the <p> tag in that first <td>. You don't need it.
<td valign="top" align="left" height="80"><img src="http://lib-04.lib.uh.edu/lib/INFOSERV/libinstruc/images/layoutdesign_01.jpg" width="641" height="80" border="0" usemap="#layout_design"alt="template"/></td>
g1smd brings up a good point too, hanging </td> or </p> tags will cause spacing issues.
thanks for your pointer it reduced the size of the space. Now the gap is little but I don't know what's causing that...
pageoneresults
thanks for your pointer as well I have taken out the extra <p></p> tag...
Is my use of the <tr> and <table> tag correct or do I need to change something there? please let me know of errors you spot...I have learned more here in two days than I learned taking college classes...
thank you all for taking the time to help me out
for example I made some changes and was validating my page and it gave me this error:
Line 45, column 6: document type does not allow element "p" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
<p><b>LENGTH:</b>one hour</p>
I noticed when I put the <object> tag in place of the <p> tag it is correct but according to my book the <object> tag is for inserting images or alternative text for browsers that don't support your code... can someone please clarify that for me..
<table [b]width="643"[/b] border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" align="left" height="80"><img src="http://lib-04.lib.uh.edu/lib/INFOSERV/libinstruc/images/layoutdesign_01.jpg" [b]width="641"[/b] height="80" border="0" usemap="#layout_design"alt="template"/></td> Your table is set to a width of 643. Your image in that first <td> is 641. It is aligned left so there is a 2px gap at the right of the image. Is this what you are referring to?
"The element will be displayed as a block-level element, with a line break before and after the element"
I see there's another topic on this in CSS [webmasterworld.com...]