Web Hosting Talk







View Full Version : An easy HTML question


Snitz
04-20-2007, 03:10 AM
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Sfeir Trading</title>
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="61" background="images/topbg.gif">&nbsp;</td>
<td width="747"><img src="images/menu.gif" width="747" height="61" /></td>
<td background="images/topbg.gif">&nbsp;</td>
</tr>
<tr>
<td height="85" background="images/headerbg.gif">&nbsp;</td>
<td><img src="images/header.gif" width="747" height="85" /></td>
<td background="images/headerbg.gif">&nbsp;</td>
</tr>
<tr>
<td background="images/topbg.gif">&nbsp;</td>
<td><img src="images/logo.gif" width="747" height="195" /></td>
<td background="images/topbg.gif">&nbsp;</td>
</tr>
<tr height="10">
<td height="10" background="images/longbg.gif"></td>
<td height="10"><img src="images/longbg.gif" width="747" height="10" /></td>
<td height="10" background="images/longbg.gif"></td>
</tr>
<tr>
<td height="100%" bgcolor="#FFFFFF">&nbsp;</td>
<td valign="top"><table width="747" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="100%">&nbsp;</td>
</tr>
</table></td>
<td bgcolor="#FFFFFF">&nbsp;</td>
</tr>
<tr>
<td valign="bottom" background="images/footerleft.gif" bgcolor="#E6E8E9">&nbsp;</td>
<td><img src="images/footer.gif" width="747" height="81" /></td>
<td background="images/footerright.gif" bgcolor="#D3D5D6">&nbsp;</td>
</tr>
</table>
</body>
</html>


Here's a layout filled with tables, I'm trying to make the middle cell to go 100% on heights but it's not working

So far, I've done this and it didn't work

<tr>
<td height="100%" bgcolor="#FFFFFF">&nbsp;</td>
<td valign="top"><table width="747" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="100%">here is what I want </td>
</tr>
</table></td>
<td bgcolor="#FFFFFF">&nbsp;</td>
</tr>
Any other thoughts?

Snitz
04-20-2007, 03:17 AM
Nevermind me, I just removed the
<!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">
But when I check it from firefox the layout seems to work perfectly, and when I check it in IE, the layout breaks down.
Take a look at the screenshots!

This is the firefox screenshot (works great)
http://www.imageslap.com/out.php/i88_firefox.jpg

And this is the IE screenshot (take a look at the bottom and on the right)
http://www.imageslap.com/out.php/i89_IE.jpg

horizon
04-20-2007, 01:37 PM
Find:


<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
add right below:


<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="100%">
Then, find:


<td background="images/footerright.gif" bgcolor="#D3D5D6">&nbsp;</td>
</tr>
</table>
add right below:


</td>
</tr>
</table>
Then, replace:


<tr>
<td height="100%" bgcolor="#FFFFFF">&nbsp;</td>
<td valign="top"><table width="747" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="100%">here is what I want </td>
</tr>
</table></td>
<td bgcolor="#FFFFFF">&nbsp;</td>
</tr>
with:


<tr>
<td height="100%" bgcolor="#FFFFFF">&nbsp;</td>
<td valign="top"><table width="747" height="100%" border="0" cellpadding="0" cellspacing="0">
</tr>
<tr>
<td height="100%" bgcolor="#FFFFFF">here is what I want </td>
</tr>
</table></td>
<td bgcolor="#FFFFFF">&nbsp;</td>
</tr>
This should do it. ;)

drhowarddrfine
04-20-2007, 10:15 PM
Nevermind me, I just removed the
<!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">This is a fundamental error. A doctype is a requirement of all web pages. Without one, you are working in 'quirks mode' and all heck breaks loose.

I'll look at this more later.

drhowarddrfine
04-20-2007, 10:41 PM
This is a fundamental error. A doctype is a requirement of all web pages. Without one, you are working in 'quirks mode' and all heck breaks loose.

I'll look at this more later.

EDIT: Never mind. Don't have the images. This is why a link is always better.

btw, you should never use tables for layout.