HTML Tables

  • Thread starter MagicFreebiesUK.co.uk
  • Start date
M

MagicFreebiesUK.co.uk

Hi,
I am using a table with three columns to display the main text on my site.
If, however, I put a lot of text in one of the columns, when I try and imput
text into one of the others it starts half way down the column. Is there
any way to make it so all of the text is aligned at the top of the columns
despite the amount of text in each of them?

At the moment the text in the centre column starts at the top of the table
but the text on the left and right starts half way down.

Your help is very much appreciated.
Cheers
Tom
 
S

Steve Pugh

MagicFreebiesUK.co.uk said:
I am using a table with three columns to display the main text on my site.

Doesn't sound like a table to me.
If, however, I put a lot of text in one of the columns, when I try and imput
text into one of the others it starts half way down the column. Is there
any way to make it so all of the text is aligned at the top of the columns
despite the amount of text in each of them?

Yes. In CSS you would apply the vertical-align property, but in
clunky, bad HTML like you seem to be using you would apply the valign
attribute,
At the moment the text in the centre column starts at the top of the table
but the text on the left and right starts half way down.

Let me guess. The centre column is the taller one?
Your help is very much appreciated.

You're welcome.

Steve
 
M

MagicFreebiesUK.co.uk

Steve Pugh said:
site.

Doesn't sound like a table to me.


Yes. In CSS you would apply the vertical-align property, but in
clunky, bad HTML like you seem to be using you would apply the valign
attribute,


Let me guess. The centre column is the taller one?


You're welcome.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <[email protected]> <http://steve.pugh.net/>


I put those valign attributes in but they don't seem to have made any
difference.

Please feel free to look at source:
http://www.magicfreebiesuk.co.uk/testpage.html

TIA
Tom
 
T

tonnie

MagicFreebiesUK.co.uk said:
I put those valign attributes in but they don't seem to have made any
difference.

Please feel free to look at source:
http://www.magicfreebiesuk.co.uk/testpage.html

Not a the <p> element but on the <table> and <td> elements.

Instead of this:

<p align="center" valign="top">dhfjdfhjnf</p>

ad a line to your <style type="text/css">

table, td { vertical-align: top; }
 
D

Dylan Parry

MagicFreebiesUK.co.uk said:
I put those valign attributes in but they don't seem to have made any
difference.

No you haven't. The valign attribute belongs to the td elements, not to
the paragraphs.

Looking at the rest of the code though, it is hardly a cut down example
of your problem is it? I had to sift through tons of really awful
looking code to find where you had gone wrong.
 
B

Barbara de Zoete

I am using a table with three columns to display the main text on my
site.

See, that's the real problem.

If, however, I put a lot of text in one of the columns, when I try and
imput
text into one of the others it starts half way down the column. Is there
any way to make it so all of the text is aligned at the top of the
columns
despite the amount of text in each of them?

Sorry, had you worked with correct markup I might have had a solution.


--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'
 
B

Beauregard T. Shagnasty

MagicFreebiesUK.co.uk said:
I put those valign attributes in but they don't seem to have made any
difference.

I was going to look at your code, but I find a mess of (unnecessary)
JavaScript, and nested tables. Totally unnecessary.

Compare your source with that of a nice three-column template by Ben
Meadowcroft, using no tables at all, shown here:

http://www.benmeadowcroft.com/webdev/csstemplates/3-column-with-footer.html

Notice how un-complex it is. Which would you rather work on? :)
 
M

MagicFreebiesUK.co.uk

Dylan Parry said:
No you haven't. The valign attribute belongs to the td elements, not to
the paragraphs.

Looking at the rest of the code though, it is hardly a cut down example
of your problem is it? I had to sift through tons of really awful
looking code to find where you had gone wrong.

Thanks tonnie that worked a charm. Only just starting to get to grips with
html and css, usually try and make frontpage do all the work.
 
S

Sid Ismail

On Mon, 11 Apr 2005 16:10:48 GMT, "MagicFreebiesUK.co.uk"

: Is there
: any way to make it so all of the text is aligned at the top of the columns
: despite the amount of text in each of them?
:
: At the moment the text in the centre column starts at the top of the table
: but the text on the left and right starts half way down.


<td valign=top> will do it, but remember that the bottom portion
will be blank then. The default is vertical align middle.

Sid
 
B

Blinky the Shark

Beauregard said:
Compare your source with that of a nice three-column template by Ben
Meadowcroft, using no tables at all, shown here:

That's odd -- or at least I *think* it's odd. If I scroll to the
bottom, the footer comes up past the bottom part of the left-column
image, leaving that part of the image hanging below the footer like a
piece of toilet paper stuck to your shoe. :) At least I wouldn't want
that to happen. Or maybe it's unavoidable.

http://www.blinkynet.net/stuff/comp/footer.gif
 
B

Blinky the Shark

Blinky said:
Beauregard T. Shagnasty wrote:
That's odd -- or at least I *think* it's odd. If I scroll to the
bottom, the footer comes up past the bottom part of the left-column
image, leaving that part of the image hanging below the footer like a
piece of toilet paper stuck to your shoe. :) At least I wouldn't want
that to happen. Or maybe it's unavoidable.

<piggybacking my own post> Oink!

I should've mentioned that that's Firefox. Same effect with Konqueror, but
not with Opera.
 
B

Beauregard T. Shagnasty

Blinky said:
<piggybacking my own post> Oink!

I should've mentioned that that's Firefox. Same effect with Konqueror, but
not with Opera.

Must be your operating system. <g> Works fine for me in W2K, FF
1.0.2, Opera 7.54, IE6.
 
D

dorayme

From: "Beauregard T. Shagnasty" <[email protected]>

snip
Compare your source with that of a nice three-column template by Ben
Meadowcroft, using no tables at all, shown here:

http://www.benmeadowcroft.com/webdev/csstemplates/3-column-with-footer.html

Notice how un-complex it is. Which would you rather work on? :)


You are right but it is a pity that it breaks in some otherwise good
browsers like IE 5 and Mozilla 1.3 on a Mac... It breaks horribly in IE but
in Mozilla, only when one reduces the window size (a practice I personally
find useful quite regularly), it is an irritation that is worrying me - I am
not meaning to criticise you unduly. Recently, in frustration, I reverted a
site I had made to the simplest 2 columns, 1 row table as a wrapper. It
stabilised everything like magic! And I did what I hope is the kosher thing
within these two simple cells. Just one table (with simple css valign and
width settings, margins none) stopped all the breaking at small window
sizes. Just could not figure things without - not so that I could trust it
at least...

dorayme
 
B

Beauregard T. Shagnasty

dorayme said:
You are right but it is a pity that it breaks in some otherwise
good browsers like IE 5 and Mozilla 1.3 on a Mac... It breaks
horribly in IE but in Mozilla, only when one reduces the window
size (a practice I personally find useful quite regularly), it is
an irritation that is worrying me

Sorry, I don't have a Mac. Can you post a screen shot of Mac IE? Works
fine in Win IE.
- I am not meaning to criticise you unduly.

Not my template. <g> Write to Ben and tell him...
 
B

Beauregard T. Shagnasty

dorayme said:

Ok, thanks. I see what you mean now. Actually, it's the same in
Windoze with IE or Moz or Firefox. You've narrowed the browser to
somewhere around 250px wide. <g> Most all sites will fail that narrow.

Ben's template does work fairly well at around 500px though, about all
one can hope for with a 3-column design.

Here's a grid for measuring windows. ;-)
http://home.rochester.rr.com/bshagnasty/bgridmarginset.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top