Table in a Table ?

F

Florent

Hello,
I've got a problem to do this:

how can I do a table like this :
____________________________
| | | <- one table
in the table
--------------------------------------
| | | | | <- another
table in the table
--------------------------------------

My problem is that the browsner align all cells of all tables (?)
Is there a way without the use of frames ?

florent.
 
M

Mark Parnell

Florent said:
[nested tables]
My problem is that the browsner align all cells of all tables (?)
Is there a way without the use of frames ?

Probably. Why not tell us what you are actually trying to achieve, rather
than what you think the solution is, and we may be able to help you.
 
B

brucie

how can I do a table like this :
____________________________
| | | <- one table
in the table

i'm not sure what the above is supposed to look like.

if you're going to use ASCII art then use a mono spaced font so it
doesn't look like a huge mess.

if you want a table aligned to the bottom of another tables cell use
valign="bottom" in the said:
My problem is that the browsner align all cells of all tables (?)
Is there a way without the use of frames ?

don't use tables for layout. don't use frames. what are you really
trying to do?
 
F

Florent

brucie said:
In post <[email protected]>
Florent said...




i'm not sure what the above is supposed to look like.

if you're going to use ASCII art then use a mono spaced font so it
doesn't look like a huge mess.

if you want a table aligned to the bottom of another tables cell use
valign="bottom" in the <td>




don't use tables for layout. don't use frames. what are you really
trying to do?
sorry :)
here is my code

<html>
<head>
<meta http-equiv="content-type"
content="text/html; charset=ISO-8859-1">
</head>
<style TYPE="text/css">
.TiG {font-family: arial; font-size: 10pt; color: #F5F5EC;}
.TiP {font-family: arial; font-size: 8pt; color: #F5F5EC;}
.Ti {font-family: arial; font-size: 12pt; color: #F5F5EC;}
.STi {font-family: arial; font-size: 10pt; color #66642B;}
</STYLE>
<body style="color: rgb(0, 0, 0); background-color: rgb(245, 245, 236);"
link="#000099" vlink="#990099" alink="#000099">

<table cellpadding="0" cellspacing="0" border="0" width="640px" height="*" ALIGN="center">
<tr><td colspan=2>
<table cellpadding="0" cellspacing="0" border="0"
style="text-align: left; width: 640px;">
<tr>

<td rowspan=2><img src="img/logoMenu.gif" title="Logo" alt="Logo" style="width: 47px; height: 47px;"> </td>
<td WIDTH="100%" HEIGHT="*" BGCOLOR="#CDCA9E"><br> </td>
</tr>
<tr HEIGHT="18px"> <td WIDTH="100%" BGCOLOR="#66642B" NOWARP ALIGN="LEFT">
<table HEIGHT="18px" cellpadding="0" WIDTH="100%" VALIGN="bottom" >
<tr>
<td align="center"> <p class="TiG">Accueil</p> </td>

<td align="left"> <p class="TiG">Java</p> </td>
<td align="left"> <p class="TiG">Perl</p> </td>
<td align="left"> <p class="TiG">Flash</p> </td>
<td align="right"> <p class="TiP">Commentaires</p> </td>

</tr>
<table>
</tr>
</table>
</td></tr>
<tr><td VALIGN="TOP">
<table cellpadding="0" cellspacing="0" border="0"
width="120px" BGCOLOR="#CDCA9E">
<tr> <td BGCOLOR="#FF8F0F" ALIGN="right"> <p class="Ti"><b>ACCUEIL</b></p></tr>

<tr> <td align="left"> <p class="STi">SousMenu</p></tr>
</table>
</td><td> HELLO<br>My Name is<br> Flofloreent<br></td>
</tr>
</table></body>

</html>

The problem with this code is that the logoMenu.gif is not 'stuck' against the menu...
and i don't see how to do

is it a best explanation ? :)
 
B

brucie

here is my code

how about a URI instead so i don't have to guess how its supposed to
look?

use meaningful class/id names.
{font-family: arial;

you don't need to repeatedly specify a font-family.

*{font-family:arial;} will apply to all elements but better yet don't
specify a font-family or only the generic family then the visitor will
see the text in their preferred font.

*{font-family:sans-serif;}
font-size: 10pt;

never use pt for font sizes. use ems or %. i recommend % as IE has a
bug with ems. 100% is the visitors preferred font size.
color: #F5F5EC;}

if you specify a color you should also specify the background color to
avoid possible conflicts with the visitors colors.
<body style="color: rgb(0, 0, 0); background-color: rgb(245, 245, 236);"

why use inline styles? body{... }
link="#000099" vlink="#990099" alink="#000099">

use CSS

don't use tables for layout
width="640px"

don't use fixed with designs. usability study after usability study
show visitors prefer liquid layouts.
style="text-align: left; width: 640px;">

again, don't use inline styles. it defeats one of the best features of
CSS. defining once - change many
<img src="img/logoMenu.gif" title="Logo" alt="Logo" style="width: 47px; height: 47px;">

use width="47" height="47" and meaningful alt text. alt="company xyz"
<tr HEIGHT="18px">

The problem with this code is that the logoMenu.gif is not 'stuck' against the menu...
and i don't see how to do

supply a URI so people can see the page, not make guesses of what it
should be because they're missing the images.
 
B

Beauregard T. Shagnasty

Florent pounced upon this pigeonhole and pronounced:
<tr HEIGHT="18px"> <td WIDTH="100%" BGCOLOR="#66642B" NOWARP ALIGN="LEFT">
<table HEIGHT="18px" cellpadding="0" WIDTH="100%" VALIGN="bottom" >
<tr>
<td align="center"> <p class="TiG">Accueil</p> </td>

<td align="left"> <p class="TiG">Java</p> </td>
<td align="left"> <p class="TiG">Perl</p> </td>
<td align="left"> <p class="TiG">Flash</p> </td>
<td align="right"> <p class="TiP">Commentaires</p> </td>

</tr>
<table>
</tr>

As far as I remember, you have to nest a table inside a <td> instead of a
<tr>.

That's what I remember. I stopped using tables for layout in the last
millennium.
 
R

Richard

Florent said:
Hello,
I've got a problem to do this:
how can I do a table like this :
____________________________
|| | | <- one table
in the table
--------------------------------------
|| | | | | <- another
table in the table
--------------------------------------
My problem is that the browsner align all cells of all tables (?)
Is there a way without the use of frames ?


That's the major hangup when using tables. Any table within a table can not
be adjusted in the manner you want it to. This is dictated by the use of
<tr><td>.
A <tr> is defined across the infinite width of the page.

What you are attempting to do would best be done with <div>.
Resaerch <div> and css attribute "float:".
Trust me. Tables are dead.
 
T

Toby A Inkster

brucie said:
*{font-family:sans-serif;}

or better yet:

html{font-family:sans-serif;}

and let everything else inherit. What's the difference? Think <pre> and
<code>.
 
B

brucie

or better yet:

html{font-family:sans-serif;}

and let everything else inherit. What's the difference?
Think <pre> and <code>.

browsers don't always inherit. think <th> and <td>
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top