Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Formatting html tables

Reply
Thread Tools

Formatting html tables

 
 
K.
Guest
Posts: n/a
 
      05-27-2008
Hello!

I have a problem with formatting tables.

I have such code (it is not the exact code I have but I simplified the
example):

<table>
<tr>
<td>
<table style="border: 1px solid black;"> //table 1
<tr>
<td>
test<br>
test
</td>
</tr>
</table>
</td>
<td>
<table style="border: 1px solid black;"> //table2
<tr>
<td>
test<br>
test
</td>
</tr>
</table>
</td>

</tr>
</table>

I know that such code is not so good, but please write me how I can achieve
such thing

I would like both "table1" and "table2" to have the same equal heights. I
would like to
build such "table1" and "table2" which will have equal heights i.e.
if "table1" will have 3 "records" of "test" word separated by <br> tag, the
height of "table2" should fit to "table1"
if "table2" will have 3 "records" of "test" word separated by <br> tag, the
height of "table1" should fit to "table2".
I also add that both "table1" and "table2" have border lines rounded by the
whole <table>

Please help me
Every help really apprieciated
M.


 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      05-27-2008
Scripsit K.:

> I have a problem with formatting tables.


Rule of thumb: You are allowed to use a simple layout table, with no
nested tables, and with no pixel-width settings, if you find this
simpler to do than CSS formatting. Otherwise, stay away from using
tables for layout, as opposite to using them for tabular data
structures.

> I have such code (it is not the exact code I have but I simplified the
> example):


You should have posted the exact URL. You have now isolated the
important part away from your snippet, and you are not helping us to
help you to find a better approach than nested tables.

> I know that such code is not so good, but please write me how I can
> achieve such thing


Why would we help you to do something that you (and we) know to be
wrong?

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
 
 
 
dorayme
Guest
Posts: n/a
 
      05-27-2008
In article <g1gnhp$e4t$(E-Mail Removed)>,
"K." <(E-Mail Removed)> wrote:

> Hello!
>
> I have a problem with formatting tables.
>
> I have such code (it is not the exact code I have but I simplified the
> example):
>
> <table>
> <tr>
> <td>
> <table style="border: 1px solid black;"> //table 1


>
> I know that such code is not so good, but please write me how I can achieve
> such thing
>
> I would like both "table1" and "table2" to have the same equal heights. I
> would like to
> build such "table1" and "table2" which will have equal heights



> Please help me as i am standing on the edge of a cliff and
> if I don't get the solution in 30 secs I will jump and
> it will be all your fault's.


In that case, you better look at:

<http://dorayme.890m.com/alt/equiTables.html>

--
dorayme
 
Reply With Quote
 
Roy A.
Guest
Posts: n/a
 
      05-28-2008
On 27 Mai, 12:24, "K." <(E-Mail Removed)> wrote:
> Hello!
>
> I have a problem with formatting tables.
>
> I have such code (it is not the exact code I have but I simplified the
> example):
>
> <table>
> * * <tr>
> * * * * <td>
> * * * * * * <table style="border: 1px solid black;"> *//table 1
> * * * * * * * * <tr>
> * * * * * * * * * * <td>
> * * * * * * * * * * * * test<br>
> * * * * * * * * * * * * test
> * * * * * * * * * * </td>
> * * * * * * * * </tr>
> * * * * * * </table>
> * * * * </td>
> * * * * <td>
> * * * * * * <table style="border: 1px solid black;"> * //table2
> * * * * * * * * <tr>
> * * * * * * * * * * <td>
> * * * * * * * * * * * * test<br>
> * * * * * * * * * * * * test
> * * * * * * * * * * </td>
> * * * * * * * * </tr>
> * * * * * * </table>
> * * * * </td>
>
> * * </tr>
> </table>
>
> I know that such code is not so good, but please write me how I can achieve
> such thing


That code is not good. Just shift your last table with a div element.
And use CSS to style the rest, like table cells.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get database metadata information (i.e. existing tables and columns in tables) Chris Brat Python 5 08-22-2006 05:25 PM
Not using tables for complex formatting markalroberts@gmail.com HTML 1 06-04-2005 02:23 PM
Tables within tables Otuatail HTML 7 08-02-2004 04:42 AM
page formatting problem with tables and datagrids - especially printing mark ASP .Net 2 06-09-2004 08:32 AM
Text after 2 tables actually appears between 2 tables ! Peter Bassett HTML 3 08-15-2003 06:46 PM



Advertisments