html tables as content

eranb2 - January 4, 2007 - 19:40

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

Paste your table code

superjacent - January 5, 2007 - 01:14

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.

Column 1 Column 2 Column

eranb2 - January 5, 2007 - 14:11

Column 1
Column 2
Column 3
Column 4

Row 1 Cell 1Row 1 Cell 2
Row 2 Cell 1Row 2 Cell 2

I took it from a tutorial , just for checking .

You need to show the actual

superjacent - January 5, 2007 - 15:07

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.

כותרת המסמך

eranb2 - January 5, 2007 - 17:46

<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

superjacent - January 5, 2007 - 23:55

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.

Drupal HTML table problem

priandoyo - November 29, 2008 - 21:11

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

 
 

Drupal is a registered trademark of Dries Buytaert.