Posted by e2 on January 4, 2007 at 7:40pm
Hi,
I added an html table in the first content "story" , I do see it properly but the table itself is always at the bottom of the page.
why is that?
Is it a good idea to work with tables, I have no html/css experience and need some fast solution?
any other ideas?
Eran
Comments
Paste your table code
I'm no expert and off the top of my head I can't answer it. Try pasting your table code here, maybe even a link to the suspect page, I'm sure it'll be a easy fix.
______________________
Steven Taylor
Melbourne, Australia.
___________________________
Steven Taylor
Prime 357
Column 1 Column 2 Column
I took it from a tutorial , just for checking .
You need to show the actual
You need to show the actual html code starting at
<table>and ending</table>.Whatever html code you want to display here - wrap it within
<code>and</code>tags. (see formatting options below)___________________________
Steven Taylor
Melbourne, Australia.
___________________________
Steven Taylor
Prime 357
כותרת המסמך
<HTML><HEAD>
<TITLE>כותרת המסמך </TITLE>
</HEAD>
<BODY bgcolor="ffff00">
<TABLE BORDER=1 width=250>
<TR>
<TD><font size=4 color=#ff0000>Zooloo</Font></TD>
<TD><font size=4 color=#ff0000>Zooloo</Font></TD>
</TR>
<TR>
<TD><font size=4 color=#00ff00>Zooloo</Font></TD>
<TD><font size=4 color=#00ff00>Zooloo</Font></TD>
</TR>
<TR>
<TD><font size=4 color=#0000ff>Zooloo</Font></TD>
<TD><font size=4 color=#0000ff>Zooloo<</Font></TD>
</TR>
</TABLE>
</BODY>
</HTML>
different table but still showing down the page.
If you're creating a post
If you're creating a post entry (story or page) in Drupal you don't have to worry about
<HTML>through to<BODY>tags, in short they are dynamically inserted when drupal displays the page.In your example above all you have to worry about is from the
<table>through to the closing</table>tag.Your border and font values need to be contained within double-quotes eg "4".
Block copy the below, create a new blog, page or story and paste, then preview entry, see what you get.
<table border="1" width="250"><tbody>
<tr>
<td><font size="4" color="#ff0000">Zooloo</font></td>
<td><font size="4" color="#ff0000">Zooloo</font></td>
</tr>
<tr>
<td><font size="4" color="#00ff00">Zooloo</font></td>
<td><font size="4" color="#00ff00">Zooloo</font></td>
</tr>
<tr>
<td><font size="4" color="#0000ff">Zooloo</font></td>
<td><font size="4" color="#0000ff">Zooloo</font></td>
</tr>
</tbody>
</table>
The above is here at my test site http://www.superjacent.net/drupal-v-5.0-rc1/?q=node/10. This link probably won't be around for too long, just a couple of days, maybe weeks, before it's broken.
There is nothing in the code snippet above which causes the table to be positioned at the bottom of a page. If that is still the case for you then I suspect it maybe something to do with CSS and that's where I'll have to opt out (I'm learning as well).
Hope this helps.
___________________________
Steven Taylor
Melbourne, Australia.
___________________________
Steven Taylor
Prime 357
Drupal HTML table problem
Hi Eranb2, this is common problem with Drupal HTML Table. It was caused by line break that you made. For example if you create table using this tag:
<TABLE><TR><TD>coloumn1</TD><TD>coloumn2</TD><TD>coloumn3</TD></TR>
<TR><TD>coloumnA</TD><TD>coloumnB</TD><TD>coloumnC</TD></TR>
<TR><TD>coloumnD</TD><TD>coloumnE</TD><TD>coloumnF</TD></TR>
</TABLE>
this code will make a three empty line right before your table. So if you create
<TABLE><TR><TD>coloumn1</TD><TD>coloumn2</TD><TD>coloumn3</TD></TR>
<TR><TD>coloumnA</TD><TD>coloumnB</TD><TD>coloumnC</TD></TR>
<TR><TD>coloumnD</TD><TD>coloumnE</TD><TD>coloumnF</TD></TR>
<TR><TD>coloumnA</TD><TD>coloumnB</TD><TD>coloumnC</TD></TR>
<TR><TD>coloumnD</TD><TD>coloumnE</TD><TD>coloumnF</TD></TR>
</TABLE>
there will be five empty line before your table. So it makes your table go to bottom of the pages.
I did not the solution for this, but every time i made a table, i write it to single line such as:
<TABLE><TR><TD>coloumn1</TD><TD>coloumn2</TD><TD>coloumn3</TD></TR><TR>TD>coloumnA</TD><TD>coloumnB</TD><TD>coloumnC</TD></TR><TR>TD>coloumnD</TD><TD>coloumnE</TD><TD>coloumnF</TD></TR></TABLE>So there is no empty line will be made.
You can see the implementation of Drupal Table at http://www.smashingpasswords.com/top-500-worst-passwords-all-time
Regards,
Anjar Priandoyo
http://priandoyo.com
solution
this problem can be solved by creating an html filter that ignores line breaks.
Table problem
I have a table in a content page which works great. The problem occurs on the home page. The "teaser" takes part of the code including the table tags, but it cuts off before it gets to the related closing tags. As a result all of the tables on the home page are goofed up. Anyone know a workaround to this problem?