TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,970
  • Latest: bynw
Stats
  • Total Posts: 196,055
  • Total Topics: 21,337
  • Online today: 572
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 92
  • Total: 92

Display Article CONTENTS In a Block

Started by JOSHSKORN, September 09, 2007, 11:45:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JOSHSKORN

Quote from: Zetan on September 10, 2007, 09:55:00 AM

If you get really stuck, just found this:
http://www.bagism.com/tablemaker/
but I recommend you learn how tables actually work to be honest.

I was afraid of this.  Basically what's happening is, is that I've got 3 paragraphs.  I'm setting it to a height of 400, I intend on filling space somehow, with images, etc.  With the code generated from this site, my paragraphs look to be centered from top to bottom, and the spacing between paragraphs is huge.  Is there a way to fix this, for instance, cell alignment or something?  This is why I wanted to try to use an article first and set the article's height.

Zetan

Well, at this stage for you, it's all experimental.
I've only just found that site myself.. and it looks very good. Wouldn't mind having the script that does that install on my site, in an Article.

If you scroll down the first page, there are explanations of what each parameter does.
Most browsers now can handle tables well.

Have a play with it. For ease of working with tables, always leave the border On (1).
This way you can see exactly what each table, cell is doing without doing it blind.
When you are happy with the result. Turn the border Off (0). Or keep it on.. up to you.
I have a border in one of my blocks with no block frame set. I often use tables to set a block height.

My site is down for now.

Ken.

That table maker site is a great find Z... thanks.  :up:
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

Zetan

Quote from: Ken on September 10, 2007, 01:35:42 PM
That table maker site is a great find Z... thanks.  :up:

I will have to bookmark it.. it seems useful if you are new to tables.. or just need to *cough* knock one up quick.

IchBin

Don't get stuck on tables, they're on their way out the door lol. Seriously though, learn tables its a good thing to know and they will always have a use IMO.

JOSHSKORN

Quote from: IchBinâ,,¢ on September 10, 2007, 11:27:19 PM
Don't get stuck on tables, they're on their way out the door lol. Seriously though, learn tables its a good thing to know and they will always have a use IMO.

Do you have any better ideas for me?  Basically I'm trying to do is a center block that displays an article BUT the catch is, I'd like a fixed height.  The article needs to display from the top.  Therefore, naturally you would see the bottom of the block with nothing in it, if the text doesn't populate the entire area.  I'm looking to basically set my height and add 'content' to the block as needed.

IchBin

You've been given the perfect information on how to do this. Start with some code, and when you get stuck post your code so we can see. You will learn soooo much more doing this.

JOSHSKORN

Quote from: IchBinâ,,¢ on September 11, 2007, 05:52:14 AM
You've been given the perfect information on how to do this. Start with some code, and when you get stuck post your code so we can see. You will learn soooo much more doing this.

OK here's my table approach, the one that has my text centered from top-to-bottom.  This is a scriptbox block.


<TABLE BORDER=0 WIDTH="100%" HEIGHT="400">
<TR>
  <TD>This is my first paragraph.</TD>
</TR>
<TR>
  <TD>This is my second paragraph.
</TR>
<TR>
  <TD>This is my final paragraph</TD>
</TR>
</TABLE>


Once again, I'm trying to set it up so it aligns everything top.

IchBin

First tip, never use capital letters for HTML tags as that will not validate if you want your site XHTML compliant etc. A minor issue, but I just thought its something you should know. To align things vertically you need to add valign="top" to your table or td tags.

JOSHSKORN

Quote from: IchBinâ,,¢ on September 11, 2007, 06:04:39 AM
First tip, never use capital letters for HTML tags as that will not validate if you want your site XHTML compliant etc. A minor issue, but I just thought its something you should know. To align things vertically you need to add valign="top" to your table or td tags.

Thanks for the tips.  Unfortunately, it's not working at all.  That is, the alignment is still centered vertically.  Can you show me what I'm doing wrong?


<table boarder=0 width="100%" height="400" valign="top">
<tr>
  <td>The first paragraph.</td>
</tr>
<tr>
  <td>The second paragraph</td>
</tr>
<tr>
  <td>The last paragraph</td>
</tr>
</table>



Click here for a visual.

This website is proudly hosted on Crocweb Cloud Website Hosting.