HELP with colspan Bug

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Given the html sample below why is col A not 50px when rendered, instead is
is closer to 100px. The colSpan on the bottom row seems to cause this. Any
help please

<body>
<table style=height:500px;width:500px; border=1>
<col name=A width=50px>
<col name=B>
<tr>
<td>A</td>
<td>B</td>
</tr>
<tr>
<td colspan=2>
<TABLE border=1 id=TableLayoutName-buttonLayout2
style="FONT-WEIGHT:normal;WIDTH: 100%;HEIGHT: 100%" cellSpacing=0
cellPadding=0>
<COL id=col0buttonLayout2 width=30>
<COL id=col1buttonLayout2 width=>
<COL id=col2buttonLayout2 width=70>
<COL id=col3buttonLayout2 width=70>

<TR>
<TD><INPUT type=button id=48 ></TD>
<TD style="PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px;
PADDING-TOP: 2px" vAlign=center noWrap align=left><LABEL class=labelView
Basic</LABEL></TD>
<TD style="PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 1px;
PADDING-TOP: 1px" vAlign=center noWrap align=left><INPUT id=50 type=button
align=middle value=Find ></TD>
<TD style="PADDING-RIGHT: 4px; PADDING-LEFT: 2px; PADDING-BOTTOM: 1px;
PADDING-TOP: 1px" vAlign=center noWrap align=left><INPUT id=51 type=button
align=middle value=Clear ></TD>
</TR>
</TABLE>
</td>
</tr>

</table>
</body>
 
Mike said:
Given the html sample below why is col A not 50px when rendered, instead is
is closer to 100px. The colSpan on the bottom row seems to cause this. Any
help please

Have you bothered validating your code? No, you have not. Look at
things like 'width=50px'. That is neither valid HTML, nor valid CSS:
with HTML, you must not specify units, since units are always pixels;
with CSS you need ':' instead of '='.
 
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/objects/col.asp
<quote>
Syntax

HTML <ELEMENT WIDTH = sWidth... >
Scripting object.width [ = sWidth ]

Possible Values

sWidth Variant that specifies or receives one of the following
values. width Integer that specifies the width of the object in pixels.
percentage String that specifies an integer value followed by
a %. The value is a percentage of the width of the parent object.


</quote>
note - Integer vales in pixels!


--
Noel Paton (MS-MVP 2002-2006, Windows)

Nil Carborundum Illegitemi
http://www.crashfixpc.com/millsrpch.htm

http://tinyurl.com/6oztj

Please read on how to post messages to NG's
 
Mike said:
This is an IE only case scenario. On a COL the width property is valid
according to MSDN. Check it out . I am not using CSS here my friend

PLEASE DO NOT TOP POST!!!

<col name=A width=50px> is not valid for any browser, not even IE. The
'px' should not be there!!!

As an added note, if you want IE to honour standards more closely, you
should be using an appropriate DOCTYPE.
 
Back
Top