For Programmers: Free Programming Magazines  


Home > Archive > ASP > August 2007 > Strange <table> behaviour









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Strange <table> behaviour
Francisco Ramos

2007-07-23, 7:55 am

Hello all

I'm getting a very strange behaviour with my <table> html elements when
designing my aspx.
See this screenshot:
http://personales.gestion.unican.es...rangetables.jpg

This screen is formed by several frames. The top table has 2 rows, one being
100% with (correct) and one row of four <td>, with the first three having
their width parameter fixed (to 80, 250 and 228 pixels). In Visual Studio
2005 I see it right, but when I run it locally, or publish to another server,
it shows like in the screenshot.
The same happens more or less with the height of the bottom frame O.o

Here is the code of the top table, if it helps (only the design part, and
i've removed some javascripts)

Thanks a lot in advance

Francisco Ramos






<html>
<!--
Estilos aplicados


-->
<head>
<meta http-equiv="Content-Language" content="es">
<title>cabecera</title>


</head>

<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0"
marginwidth="0" marginheight="0" style="text-align: center">

<table width="100%" id="table1" bgcolor="#195963" height="125">
<tr height="37">
<td height="37" colspan="4" bgcolor="#F2A910">
<p align="center">
<img border="0" src="images/cabecera.png" width="600" height="35"></td>
</tr>
<tr height="80px">
<td height="80" width="80" style="height: 80px">
<img border="0" name="imguc" src="images/logoweb.jpg" width="78"
height="78"></td>
<td height="80" width="250" align="center"><div align="center">
<table border="1" width="97%" id="table2" cellspacing="1" cellpadding="0"
height="76" bordercolor="#FFFFFF" style="border-collapse: collapse">
<tr>
<td>
<a href="#"
onclick="parent.frames['contenidos'].location.href='planes.aspx'"
class="cabecera" id="id1" onmouseout="imguc.src='images/logoweb.jpg'"
onmouseover="imguc.src='images/libro.gif'">CURSOS
</a>
</td>
<td bgcolor="#195963" align="center"><b>
<a href="#"
onclick="parent.frames['contenidos'].location.href='paginas/presentacion.aspx'"
class="cabecera" id="id2" onmouseout="imguc.src='images/logoweb.jpg'"
onmouseover="imguc.src='images/presen.gif'">PRESENTACION</a></b></td>
</tr>
<tr>
<td><b>
<a href="#"
onclick="parent.frames['contenidos'].location.href='paginas/ayuda.aspx'"
class="cabecera" id="id3" onmouseout="imguc.src='images/logoweb.jpg'"
onmouseover="imguc.src='images/ayuda.gif'">AYUDA</a></b></td>
<td width="50%"><b>
<a href="http://www.cefont.unican.es" target="_top" class="cabecera"
id="id4" onmouseout="imguc.src='images/logoweb.jpg'"
onmouseover="imguc.src='images/cefont_blancoverde.gif'">CeFoNT</a></b></td>
</tr>
<tr>
<td>
<a href="#"
onclick="parent.frames['contenidos'].location.href='paginas/enlaces.aspx'"
class="cabecera" id="id5" onmouseout="imguc.src='images/logoweb.jpg'"
onmouseover="imguc.src='images/enlaces.gif'">ENLACES</a></td>
<td>
<a href="#"
onclick="parent.frames['contenidos'].location.href='paginas/contacto.aspx'"
class="cabecera" id="id6" onmouseout="imguc.src='images/logoweb.jpg'"
onmouseover="imguc.src='images/contacto.gif'">CONTACTO</a></td>
</tr>
</table></div>
</td>
<td height="80" width="228" align=center>
<iframe src="signon/mini.aspx" scrolling="no" width="222" frameborder="0"
height="75" />
</td>
<td height="80" align="center" valign="middle">
<div align="center">
<p align="center"><b><font face="Verdana" size="2">ESPACIO RESERVADO PARA
NOTICIAS </font></b>
</div>
</td>
</tr>
</table>

</body>

ThatsIT.net.au

2007-07-23, 7:55 am


"Francisco Ramos" <Francisco Ramos@discussions.microsoft.com> wrote in
message news:636332F2-0324-45B7-88E4-67A113696620@microsoft.com...
> Hello all
>
> I'm getting a very strange behaviour with my <table> html elements when
> designing my aspx.
> See this screenshot:
> http://personales.gestion.unican.es...rangetables.jpg
>
> This screen is formed by several frames. The top table has 2 rows, one
> being
> 100% with (correct) and one row of four <td>, with the first three having
> their width parameter fixed (to 80, 250 and 228 pixels). In Visual Studio
> 2005 I see it right, but when I run it locally, or publish to another
> server,
> it shows like in the screenshot.
> The same happens more or less with the height of the bottom frame O.o
>
> Here is the code of the top table, if it helps (only the design part, and
> i've removed some javascripts)
>
> Thanks a lot in advance
>
> Francisco Ramos



This is not a ASP problem.
you also have not explained what the strange behaviour is.
I can see your screen shot, but am not sure what you were aiming for

>
>
>
>
>
>
> <html>
> <!--
> Estilos aplicados
>
>
> -->
> <head>
> <meta http-equiv="Content-Language" content="es">
> <title>cabecera</title>
>
>
> </head>
>
> <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0"
> marginwidth="0" marginheight="0" style="text-align: center">
>
> <table width="100%" id="table1" bgcolor="#195963" height="125">
> <tr height="37">
> <td height="37" colspan="4" bgcolor="#F2A910">
> <p align="center">
> <img border="0" src="images/cabecera.png" width="600" height="35"></td>
> </tr>
> <tr height="80px">
> <td height="80" width="80" style="height: 80px">
> <img border="0" name="imguc" src="images/logoweb.jpg" width="78"
> height="78"></td>
> <td height="80" width="250" align="center"><div align="center">
> <table border="1" width="97%" id="table2" cellspacing="1" cellpadding="0"
> height="76" bordercolor="#FFFFFF" style="border-collapse: collapse">
> <tr>
> <td>
> <a href="#"
> onclick="parent.frames['contenidos'].location.href='planes.aspx'"
> class="cabecera" id="id1" onmouseout="imguc.src='images/logoweb.jpg'"
> onmouseover="imguc.src='images/libro.gif'">CURSOS
> </a>
> </td>
> <td bgcolor="#195963" align="center"><b>
> <a href="#"
> onclick="parent.frames['contenidos'].location.href='paginas/presentacion.aspx'"
> class="cabecera" id="id2" onmouseout="imguc.src='images/logoweb.jpg'"
> onmouseover="imguc.src='images/presen.gif'">PRESENTACION</a></b></td>
> </tr>
> <tr>
> <td><b>
> <a href="#"
> onclick="parent.frames['contenidos'].location.href='paginas/ayuda.aspx'"
> class="cabecera" id="id3" onmouseout="imguc.src='images/logoweb.jpg'"
> onmouseover="imguc.src='images/ayuda.gif'">AYUDA</a></b></td>
> <td width="50%"><b>
> <a href="http://www.cefont.unican.es" target="_top" class="cabecera"
> id="id4" onmouseout="imguc.src='images/logoweb.jpg'"
> onmouseover="imguc.src='images/cefont_blancoverde.gif'">CeFoNT</a></b></td>
> </tr>
> <tr>
> <td>
> <a href="#"
> onclick="parent.frames['contenidos'].location.href='paginas/enlaces.aspx'"
> class="cabecera" id="id5" onmouseout="imguc.src='images/logoweb.jpg'"
> onmouseover="imguc.src='images/enlaces.gif'">ENLACES</a></td>
> <td>
> <a href="#"
> onclick="parent.frames['contenidos'].location.href='paginas/contacto.aspx'"
> class="cabecera" id="id6" onmouseout="imguc.src='images/logoweb.jpg'"
> onmouseover="imguc.src='images/contacto.gif'">CONTACTO</a></td>
> </tr>
> </table></div>
> </td>
> <td height="80" width="228" align=center>
> <iframe src="signon/mini.aspx" scrolling="no" width="222" frameborder="0"
> height="75" />
> </td>
> <td height="80" align="center" valign="middle">
> <div align="center">
> <p align="center"><b><font face="Verdana" size="2">ESPACIO RESERVADO PARA
> NOTICIAS </font></b>
> </div>
> </td>
> </tr>
> </table>
>
> </body>
>



Francisco Ramos

2007-07-24, 7:55 am

What i was trying is this:
http://personales.gestion.unican.es...angetables2.jpg

(Note the differences in the <td> containing the university logo, now fixed
to 80x80 as intented, and the <iframe>s in the middle of the page, now
extended to 100% available space as intented)

wich I finally manage to get by changing the autogenerated doctype line:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

for this one:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

Thanks a lot for your interest anyway


"ThatsIT.net.au" wrote:

>
> "Francisco Ramos" <Francisco Ramos@discussions.microsoft.com> wrote in
> message news:636332F2-0324-45B7-88E4-67A113696620@microsoft.com...
>
>
> This is not a ASP problem.
> you also have not explained what the strange behaviour is.
> I can see your screen shot, but am not sure what you were aiming for
>
>
>
>

ThatsIT.net.au

2007-07-27, 6:56 pm

a better way to do this is like this

<table with="400" style="table-layout: fixed">

<col width="80" />

<col />

<col width="80" />

<tr>

<td>this will be 80</td>

<td>this will fill the rest of the table</td>

<td>this will be 80</td>

</tr>

</table>




"Francisco Ramos" <FranciscoRamos@discussions.microsoft.com> wrote in
message news:4165D983-D8C4-40E4-A0C6-84F21AC2CFEE@microsoft.com...[color=darkred]
> What i was trying is this:
> http://personales.gestion.unican.es...angetables2.jpg
>
> (Note the differences in the <td> containing the university logo, now
> fixed
> to 80x80 as intented, and the <iframe>s in the middle of the page, now
> extended to 100% available space as intented)
>
> wich I finally manage to get by changing the autogenerated doctype line:
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
> for this one:
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>
> Thanks a lot for your interest anyway
>
>
> "ThatsIT.net.au" wrote:
>


Bob Barrows [MVP]

2007-07-27, 6:56 pm

Francisco Ramos wrote:
> What i was trying is this:
> http://personales.gestion.unican.es...angetables2.jpg
>

It has taken three days for you to get an answer to this. I suggest you
would have gotten your answer more quickly by posting to a newsgroup where
html questions are on topic. Here is a list:

http://groups.google.com/groups/dir?sel=33584039


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


Francisco Ramos

2007-08-01, 7:56 am

Thanks a lot!!

"ThatsIT.net.au" wrote:

> a better way to do this is like this
>
> <table with="400" style="table-layout: fixed">
>
> <col width="80" />
>
> <col />
>
> <col width="80" />
>
> <tr>
>
> <td>this will be 80</td>
>
> <td>this will fill the rest of the table</td>
>
> <td>this will be 80</td>
>
> </tr>
>
> </table>
>
>
>
>
> "Francisco Ramos" <FranciscoRamos@discussions.microsoft.com> wrote in
> message news:4165D983-D8C4-40E4-A0C6-84F21AC2CFEE@microsoft.com...
>
>
>

Francisco Ramos

2007-08-01, 7:56 am

Thanks, i posted here because i thought it had something to do with Visual
Studio. Now I know it was simply an html problem

"Bob Barrows [MVP]" wrote:

> Francisco Ramos wrote:
> It has taken three days for you to get an answer to this. I suggest you
> would have gotten your answer more quickly by posting to a newsgroup where
> html questions are on topic. Here is a list:
>
> http://groups.google.com/groups/dir?sel=33584039
>
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>
>

Bob Barrows [MVP]

2007-08-01, 7:56 am

Francisco Ramos wrote:
> Thanks, i posted here because i thought it had something to do with
> Visual Studio. Now I know it was simply an html problem
>


:-)
This isn't a Visual Studio group either ... :-)

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com