W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2005

Warping Layout Problems

From: jonathan langlois <enalung@gmail.com>
Date: Sun, 16 Oct 2005 02:02:28 -0400
Message-ID: <6d7df4b0510152302o62ee7f69s8e677be99b6b1786@mail.gmail.com>
To: html-tidy@w3.org
I think I might just have found a most strange bug.

The formating on my webpage is done by CSS. I noticed that somehow, my
layout was warping leaving a big space between what will become the logo and
what will become the banner. I searched and searched like a madman in my
code to find the mistake, I validated it successfully each time. In the end,
I found out that just leaving &nbsp; in my table fixed this strange spacing

Try it yourself, use my code with the &nbsp; in the first 3 cells of the
table, then remove them. You should notice the layout warping as I

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
<html xmlns="http://www.w3.org/1999/xhtml">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type" />
<style type="text/css">
table#layout {
width: 100%;
height: 100%;
/* Banner Start */
td#logo {
width: 280px;
height: 280px;
background:url('Logo.png') no-repeat;
td#banner {
width: 460px;
height: 280px;
background:url('Banner.png') no-repeat;
td#rightrepeat {
width: auto;
height: 280px;
background:url('RightRepeat.png') repeat-x;
/* Banner End *//* Side Menu Start */
td#sidemenu {
width: auto;
height: 380px;
background:url('Menu.png') no-repeat;
td#bottomrepeat {
width: auto;
height: auto;
background:url('BottomRepeat.png') repeat-y;
/* Side Menu End *//* Main Content Start */
td#maincontent {
width: auto;
height: auto;
/* Main Content End *//* Footer Start */
td#menufooter {
width: auto;
height: auto;
background:url('BottomRepeat.png') repeat-y;
td#mainfooter {
width: auto;
height: auto;
/* Footer End *//* Validation Start */
img.validation {
border: 0px none ;
width: 88px;
height: 31px;
/* Validation End *//* Misc Start */
p.center {
text-align: center;
/* Misc End */
<table id="layout" cellpadding="0" cellspacing="0">
<!-- Logo Start --> <td id="logo">&nbsp;</td>
<!-- Logo End --><!-- Banner Start --> <td
<!-- Banner End --><!-- Right Image repeat Start -->
<td id="rightrepeat">&nbsp;</td>
<!-- Right image repeat End --> </tr>
<!-- Side menu Start --> <td id="sidemenu"></td>
<!-- Side menu End --><!-- Main content Start -->
<td id="maincontent" rowspan="2" colspan="2"></td>
<!-- Main content End --> </tr>
<!-- Bottom image repeat Start --> <td
<p class="center"><a
alt="Valid XHTML 1.0!"
src="http://www.w3.org/Icons/valid-xhtml10" class="validation" /></a><a
alt="Valid CSS!"
class="validation" /></a></p>
<p class="center">What does this mean?</p>
<!-- Bottom image repeat End --><!-- Footer Start -->
<td id="menufooter"></td>
<td id="mainfooter" colspan="2" rowspan="1"></td>
<!-- Footer End -->
Received on Sunday, 16 October 2005 09:15:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:55 GMT