473,543 Members | 1,807 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Formating a table

BT
I'm trying to format a three column table and I can't get things to line up
the way I need to. The first column is text of variable length that might
wrap onto multiple lines. It is within <p></p> tags to right/left justify
it. The second column is a column of ditto marks, centered left/right in
the cell and aligned with the bottom line of text of column 1. The third
column is a column of numbers also aligned with the bottom line of text in
column 1, but these numbers need to be right justified.

Here is the code:

<tr>
<td valign="top"><p >Ressaldar Fatteh Khan, Khuttuk, who at
the head of seventy men of the Guides'
Cavalry defeated and drove into
Mooltan a Brigade of Sikh Cavalry,
from a picture by W. Carpenter. By
kind permission of General Sir Peter
Lumsden, G.C.B.</p> </td>
<td valign="bottom" align="center"> &quot; </td>
<td valign="bottom" align="right">2 4</td>
</tr>
If I remove the <p> tags from the first column, I can get the valign correct
in columns 2 and 3, but I loose the left/right justification I need in
column 1. I tried to add <p> tags to columns 2 & 3, but then I seem to
loose the left/right alignment of column 2 and 3. I tried to change valign
in column 1 to 'top', with no improvement.

Any ideas? thanks, BDT


Sep 4 '05 #1
6 1815
BT
BTW, I'm doing this as Doctype: XHTML 1.0 Strict and I've been checking its
layout in Firefox V 1.0.6 and MS IE 6.

thanks, BDT

"BT" <no@xnono.com > wrote in message
news:o5******** ************@to rnado.texas.rr. com...
I'm trying to format a three column table and I can't get things to line
up the way I need to. The first column is text of variable length that
might wrap onto multiple lines. It is within <p></p> tags to right/left
justify it. The second column is a column of ditto marks, centered
left/right in the cell and aligned with the bottom line of text of column
1. The third column is a column of numbers also aligned with the bottom
line of text in column 1, but these numbers need to be right justified.

Here is the code:

<tr>
<td valign="top"><p >Ressaldar Fatteh Khan, Khuttuk, who at
the head of seventy men of the Guides'
Cavalry defeated and drove into
Mooltan a Brigade of Sikh Cavalry,
from a picture by W. Carpenter. By
kind permission of General Sir Peter
Lumsden, G.C.B.</p> </td>
<td valign="bottom" align="center"> &quot; </td>
<td valign="bottom" align="right">2 4</td>
</tr>
If I remove the <p> tags from the first column, I can get the valign
correct in columns 2 and 3, but I loose the left/right justification I
need in column 1. I tried to add <p> tags to columns 2 & 3, but then I
seem to loose the left/right alignment of column 2 and 3. I tried to
change valign in column 1 to 'top', with no improvement.

Any ideas? thanks, BDT

Sep 4 '05 #2
"BT" <no@xnono.com > wrote:
I'm trying to format a three column table and I can't get things to
line up the way I need to.
Your question would thus appear to relate to CSS rather than HTML.
The first column is text of variable length
that might wrap onto multiple lines. It is within <p></p> tags to
right/left justify it.
Whether you use <p> markup should depend solely on the question whether you
have a _paragraph_ of text.

Besides, <p> markup does not cause any "right/left justify", whatever you
mean by that. You need to explain your problem using common terms, not
invented expressions.

Oh, and please post the URL.
The second column is a column of ditto marks,
No, in your snippet, it contains the Ascii quotation mark.
If I remove the <p> tags from the first column, I can get the valign
correct in columns 2 and 3, but I loose the left/right justification I
need in column 1.


Remove the tags, since you have no paragraph there. Then write suitable
CSS, or if you insist on using deprecated technology, some clumsy HTML
attributes for vertical and horizontal alignment. If problems remain, post
the URL and explain what you regard as undesirable in the appearance.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Sep 4 '05 #3
BT

"Jukka K. Korpela" <jk******@cs.tu t.fi> wrote in message
news:Xn******** *************** *****@193.229.0 .31...
"BT" <no@xnono.com > wrote:
I'm trying to format a three column table and I can't get things to
line up the way I need to.
Your question would thus appear to relate to CSS rather than HTML.


Yes, it could be done with CSS, but since the page will only have one
table there seems to be little or no reason to set it up with CSS. If there
is a good CSS solution, please advise.
The first column is text of variable length
that might wrap onto multiple lines. It is within <p></p> tags to
right/left justify it.
Whether you use <p> markup should depend solely on the question whether
you
have a _paragraph_ of text.


Yes, there is a paragraph of text as the code example shows.

Besides, <p> markup does not cause any "right/left justify", whatever you
mean by that. You need to explain your problem using common terms, not
invented expressions.
Perhaps my terminology confuses you. Before I added the <p> tags, the text
was left justified, probably by default (left justified meaning that the
left side
of each line was even with any line in the same paragraph immediate above
and/or below it) and the right side of the paragraph was ragged with no
alignment.

After I added the <p> tags, both the left and right sides of the paragraph
lined up
smoothly. What is the 'common term' for this paragraph layout?

Oh, and please post the URL.
There is no URL yet. This is a small table in a book of about 8000
lines and will eventually be posted to www.gutenberg.org
The second column is a column of ditto marks,
No, in your snippet, it contains the Ascii quotation mark.


You are correct.
If I remove the <p> tags from the first column, I can get the valign
correct in columns 2 and 3, but I loose the left/right justification I
need in column 1.
Remove the tags, since you have no paragraph there. Then write suitable
CSS, or if you insist on using deprecated technology, some clumsy HTML
attributes for vertical and horizontal alignment. If problems remain, post
the URL and explain what you regard as undesirable in the appearance.


As indicated in my follow-up, 'Doctype: XHTML Strict' so I don't plan
to use any deprecated tags. As a volunteer learning to do this I recognize
that I may end up with some clumsy HTML. I only ask for assistance to
learn and to minimize clumsy HTML.

If there isn't enough info here for you to be able to offer meaningful
assistance, perhaps someone else can.

thank you, BDT

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Sep 4 '05 #4

BT wrote:
I'm trying to format a three column table and I can't get things to line up
the way I need to ..... Any ideas? thanks, BDT


Check these references:

http://www.w3.org/2002/11/homepage

http://www.w3.org/2002/03/csslayout-howto

http://www.glish.com/css/

--
James Pickering
http://jp29.org/
(CSS 3 column layout)

Sep 4 '05 #5
BT wrote :
I'm trying to format a three column table and I can't get things to line up
the way I need to. The first column is text of variable length that might
wrap onto multiple lines.
Are you using the correct markup for a paragraph then? The best practice
is to render a paragraph is to use a <p> and the best practice to render
tabular data is to use a <table>. Otherwise, your markup code can not
best be rendered, can not best degrade gracefully in several media, user
agents, web-aware applications.

It is within <p></p> tags to right/left justify it. The second column is a column of ditto marks,
Sorry... what's ditto marks?

centered left/right in the cell and aligned with the bottom line of text of column 1. The third
column is a column of numbers also aligned with the bottom line of text in
column 1, but these numbers need to be right justified.

Can you post an url about all this? Are you truly designing for major
blocks of content or for tabular data here... I'm still not sure...
Here is the code:

<tr>
<td valign="top"><p >Ressaldar Fatteh Khan, Khuttuk, who at
the head of seventy men of the Guides'
Cavalry defeated and drove into
Mooltan a Brigade of Sikh Cavalry,
from a picture by W. Carpenter. By
kind permission of General Sir Peter
Lumsden, G.C.B.</p> </td>
<td valign="bottom" align="center"> &quot; </td>
<td valign="bottom" align="right">2 4</td>
</tr>
Can you describe what your webpage is about, general description...
If I remove the <p> tags from the first column, I can get the valign correct
in columns 2 and 3, but I loose the left/right justification I need in
column 1. I tried to add <p> tags to columns 2 & 3, but then I seem to
loose the left/right alignment of column 2 and 3. I tried to change valign
in column 1 to 'top', with no improvement.

Any ideas? thanks, BDT


Here's a few resources to help you start. I have not checked in details
each of these resources but I'd say they should bring you more values
than problems, in the short term and long run:

Learning HTML and CSS:
- HTML Dog: http://www.htmldog.com/
- CSS Recommendations , best CSS practices and 12 very valuable CSS tips:
http://www.456bereastreet.com/lab/de...standards/css/
- http://tutorials.alsacreations.com/

Learning website design (a bit outdated at places but overall excellent
resources):
Dan's website design tips:
http://webtips.dan.info/

W3C Quality Assurance tips (I highly recommend each tip):
Quality Tips for Webmasters
http://www.w3.org/QA/Tips/

List of CSS templates:
http://www.maxdesign.com.au/presenta...outs/index.cfm

Simple 2 column CSS layout with tutorial on how to create templates:
http://www.456bereastreet.com/lab/de...slayout/2-col/
How to create templates is useful as you learn eventually how to manage,
tweak, tune, upgrade, customize or modify your own webpages based on
such template

3 columns (abs. pos.) scalable and fluid:
http://www.positioniseverything.net/...l.stretch.html

3 columns scalable and fluid (The “I can't believe it's not a table!”
layout):
http://www.positioniseverything.net/threecolbglong.html

Gérard
--
remove blah to email me
Sep 4 '05 #6
"BT" <no@xnono.com > wrote:
Yes, it could be done with CSS, but since the page will only have one
table there seems to be little or no reason to set it up with CSS. If
there is a good CSS solution, please advise.
It's probably easier in CSS than in HTML, even if you need to use class
attributes in many cells. (Still simpler than putting several attributes in
cells.)
Whether you use <p> markup should depend solely on the question
whether you have a _paragraph_ of text.


Yes, there is a paragraph of text as the code example shows.


It's not a paragraph under a normal definition of "paragraph" .
Before I added the <p> tags, the
text was left justified, probably by default
Left justified is generally the default in HTML.
After I added the <p> tags, both the left and right sides of the
paragraph lined up
smoothly. What is the 'common term' for this paragraph layout?
That's called justification, and adding the <p> markup did _not_ cause it
unless you have some style sheet that sets properties for p elements.

Justification is seldom justified on the Web, since browsers do it so
poorly and since it reduces legibility.

So why did you add the <p> tags?
Oh, and please post the URL.


There is no URL yet.


Then create one and post it. Even if it's just your current best effort.
After all, it's a matter of simple upload.
As indicated in my follow-up, 'Doctype: XHTML Strict' so I don't plan
to use any deprecated tags.


Why do you plan to use XHTML? Do you realize that IE does not grok XHTML?

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Sep 4 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2201
by: Polar | last post by:
I have a database that stories entries of short stories for a writers website. I can easily input the data into MYSQL but my trouble lies in retrieving the data. the story in just cut and pasted from a WP into the TEXTAREA on the form. When I look at the story in the DB I can see it retains all the paragraph spacing etc. but when I try...
0
1785
by: Gerald Thallinger | last post by:
Hallo together! I try so solve the following problem. I wrote a HTML-File an print it via MS Internet Explorer, Version 6.0. I currently have all 3 tables in my report for outputting. I print the header table. I print the body table with, 1 to 100 rows from the database. Then I print the footer. Currently I put a height on the body...
6
4698
by: Dave Smithz | last post by:
Hi there, A client of mine wants to start generating some reports from their PHP / MYSQL database. They were previously gathering data from the screen and cutting and pasting it into a Word document template. They now just want to generate it. My initial thoughts are to just format the information in a table and then they print it out....
0
1466
by: rodrigo guerra | last post by:
where i can change the code formating that visual studio does in the code.... like if i type: if ( ) { .... } visual studio changes to:
0
1152
by: Dmitri Manushin | last post by:
Hi all, i have textBox (multiline) i'am enter many words and don't push enter next i push button and text record in database. When i read data from database in table i'am use teg <pre> for save text formating, but i don't push enter in previous example and my table grow in right. How i can solve my problem. Thanks. P.S.
3
2102
by: Smiley | last post by:
Hi, I know how to do confitional formating in Excel by clicking the wizard. Is this possible in MS Access ? If so, please directly where to look. I found example but nothing as to how to do it. I am very green in this. Please help.
2
2773
by: just_me | last post by:
Hello, I'd like to ask if anyone knows the format /category/13/ where probably 13 is the ID if it's actually a directory/file and a script automatically created it when someone updated his site or they just use a regex method to extract the number (which means /13/ is virtual), in our case '13' and then try "select 'bla bla' from table...
2
1558
by: Amorphous | last post by:
Hi. I've got a bit of a problem. I need to make several tables for a forum post. I can use HTML, but I cannot edit the HTML of the page itself outside of the post area. I cannot edit <head> or anything of the like, I can only add HTML. I have my own webspace so I can host my own files. My problem is that the forum's CSS formating makes my table...
0
1743
by: Fonix | last post by:
I'm trying to make table border with pyExcelerator. As i can see there is only cell formating!? If i'm wrong pls tell me what is method to make more then one cell to have same format, other then just give them one-by-one. For little tables 100/20 formating cell by cell work ( i try with borders) fine. But when i get 5000/20 excel say:...
2
1732
by: sitko | last post by:
Hi, I'm in the process of converting a VB.net program into a C program so it can run on a unix like machine. I've been moving along at a nice pace, but this conversion has stumped me. I need a function to take two arguments:(a double number which may or may not be an integer, and an integer which will be the number of digits to store...
0
7411
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7594
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7746
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7693
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5888
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4898
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3394
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1824
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
978
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.