hey i have an html issue

C

catalyst

The following is the scheme...
<table>
<tr>
<td>cellA</td>
<td>cellB</td>
</tr>
<tr>
<td>cellC<td><!--this is the middle where the content goes-->
</tr>
<tr colspan="3"><td>cellD</td> <!--here is the last row for copyright-->
</table>

I tried all kind of combinations, but don't have a clue how to make cellC
that expands in the middle, i tried to use both colspan and rowspan together
but didn't worked...
The cellA goes over cellC so pushes the cellB out of the table. ...So the
first row would need to have two cells, second row takes the "width" of this
two and the third row takes the "width" of the whole(i.e.of that two-cellA
and cellB), the third row always works with the colspan="3". This must be
some trick...of some kind to make this work.

Thanks,
c.
 
A

Adrienne Boswell

The following is the scheme...
<table>
<tr>
<td>cellA</td>
<td>cellB</td>
</tr>
<tr>
<td>cellC<td><!--this is the middle where the content goes-->
</tr>
<tr colspan="3"><td>cellD</td> <!--here is the last row for
copyright--> </table>

I tried all kind of combinations, but don't have a clue how to make
cellC that expands in the middle, i tried to use both colspan and
rowspan together but didn't worked...
The cellA goes over cellC so pushes the cellB out of the table. ...So
the first row would need to have two cells, second row takes the
"width" of this two and the third row takes the "width" of the
whole(i.e.of that two-cellA and cellB), the third row always works
with the colspan="3". This must be some trick...of some kind to make
this work.

Thanks,
c.

First, use the right tool for the job. Tables are for tabular data.
Google for CSS three column layout. Plenty of examples, or search
through this group for examples.
 
A

Adrienne Boswell

The following is the scheme...
<table>
<tr>
<td>cellA</td>
<td>cellB</td>
</tr>
<tr>
<td>cellC<td><!--this is the middle where the content goes-->
</tr>
<tr colspan="3"><td>cellD</td> <!--here is the last row for
copyright--> </table>

I tried all kind of combinations, but don't have a clue how to make
cellC that expands in the middle, i tried to use both colspan and
rowspan together but didn't worked...
The cellA goes over cellC so pushes the cellB out of the table. ...So
the first row would need to have two cells, second row takes the
"width" of this two and the third row takes the "width" of the
whole(i.e.of that two-cellA and cellB), the third row always works
with the colspan="3". This must be some trick...of some kind to make
this work.

Thanks,
c.

First, use the right tool for the job. Tables are for tabular data.
Google for CSS three column layout. Plenty of examples, or search
through this group for examples.
 
E

Els

catalyst said:
The following is the scheme...
<table>
<tr>
<td>cellA</td>
<td>cellB</td>
</tr>
<tr>
<td>cellC<td><!--this is the middle where the content goes-->
</tr>
<tr colspan="3"><td>cellD</td> <!--here is the last row for copyright-->
</table>

I tried all kind of combinations, but don't have a clue how to make cellC
that expands in the middle, i tried to use both colspan and rowspan together
but didn't worked...
The cellA goes over cellC so pushes the cellB out of the table. ...So the
first row would need to have two cells, second row takes the "width" of this
two and the third row takes the "width" of the whole(i.e.of that two-cellA
and cellB), the third row always works with the colspan="3". This must be
some trick...of some kind to make this work.

There is no trick, you just need to count your cells.
You have 2 cells in row one, 1 in row 2, and 3 (one that has
colspan="3") in the third row. What you need is an equal amount of
cells in each row.

What I *think* you want, is:
<table>
<tr>
<td> A </td>
<td> B </td>
</tr>
<tr>
<td colspan="2"> C </td>
</tr>
<tr>
<td colspan="2"> D </td>
</tr>
</table>

If that's not what you want, I think you'll need to make a nice
drawing that shows what you want.
 
N

Neredbojias

Well bust mah britches and call me cheeky, on Sat, 02 Feb 2008 18:07:17
GMT catalyst scribed:
The following is the scheme...
<table>
<tr>
<td>cellA</td>
<td>cellB</td>
</tr>
<tr>
<td>cellC<td><!--this is the middle where the content goes-->
</tr>
<tr colspan="3"><td>cellD</td> <!--here is the last row for
copyright--> </table>

I tried all kind of combinations, but don't have a clue how to make
cellC that expands in the middle, i tried to use both colspan and
rowspan together but didn't worked...
The cellA goes over cellC so pushes the cellB out of the table. ...So
the first row would need to have two cells, second row takes the
"width" of this two and the third row takes the "width" of the
whole(i.e.of that two-cellA and cellB), the third row always works
with the colspan="3". This must be some trick...of some kind to make
this work.

How 'bout:

<div>
<div style="float:left">cellA</div><div>cellB</div>
<div>cellC</div>
<div>cellD</div>
</div>
 
C

catalyst

I have solved the problem with padding option.
Miraculously, it helped. In the cellB i added padding-right: 805px;" which
turned the picture in the right place, again, as it should be. It seems,
there's no solution with tables to do this, or i'm not to clever to do such
a manevouar. hmm...it's hard to to a layout with tables, but different i do
not know. I think i'll specialise myself ...heh :)
Thanks for Your helps!
 
R

richard

The following is the scheme...
<table>
<tr>
<td>cellA</td>
<td>cellB</td>
</tr>
<tr>
<td>cellC<td><!--this is the middle where the content goes-->
</tr>
<tr colspan="3"><td>cellD</td> <!--here is the last row for copyright-->
</table>

I tried all kind of combinations, but don't have a clue how to make cellC
that expands in the middle, i tried to use both colspan and rowspan together
but didn't worked...
The cellA goes over cellC so pushes the cellB out of the table. ...So the
first row would need to have two cells, second row takes the "width" of this
two and the third row takes the "width" of the whole(i.e.of that two-cellA
and cellB), the third row always works with the colspan="3". This must be
some trick...of some kind to make this work.

Thanks,
c.


Then try this:

<tr><td>row 1 cell a</td><td>row 1 cell b</td></tr>
<tr><td colspan="2">row 2 cell c</td></tr>
<tr><td cplspan="2">row 3 cell d</td></tr>

You must define each row without the same number of cells to span.
Otherwise, it defaults to a colspan="1" leaving a blank empty cell.
 
S

SigelsTankMage

Adreinne is right, tables are for tabular data. Since i have seen this
problem pop up here before I decided to try and make a little demo to
help. I used HTML/CSS for this demo. "/** **/" Annotates comments in
CSS. I used code demonstrated at glish.com/css from their "4 column
all fluid" example.

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>4 columns all fluid</title>
<link rel="stylesheet" type="text/css" href="main.css" />
</head>

<body>
<div id="container">
<div id="A">
<p>This is A</p>
</div>
<div id="B">
<p>This is B</p>
</div>
<div id="C">
<p>This is C</p>
</div>
<div id="D">
<p>This is D</p>
</div>
</div>
</body>
</html>

body {
background-color: #DDD;
}

#A{ /** This Changes the style of the column just copypasta and change
the ID for more "cells" **/
width:100px;
background-color:#EAA900;
position:absolute;
left:10%;
width:10%;
}

#B{
width:100px;
background-color:#EA6000;
position:absolute;
left:20%;
width:10%;
}

#C{
width:100px;
background-color:#0098EA;
position:absolute;
left:30%;
width:10%;
}

#D{
width:100px;
background-color:#EA89DB;
position:absolute;
left:40%;
width:10%;
}
 
R

richard

I have solved the problem with padding option.
Miraculously, it helped. In the cellB i added padding-right: 805px;" which
turned the picture in the right place, again, as it should be. It seems,
there's no solution with tables to do this, or i'm not to clever to do such
a manevouar. hmm...it's hard to to a layout with tables, but different i do
not know. I think i'll specialise myself ...heh :)
Thanks for Your helps!

If you learned how to use divisions rather than relying on tables,
your desired output would be easier.

<div style="float;left;"> row 1 cell a</div>
<div style="float:left;">row 1 cell b</div>
<div style="clear:left;"> row 2 cell c</div>
<div> row 3 cell d </div>

Now style each div with css accordingly.
 
A

asdf

Adrienne Boswell said:
First, use the right tool for the job. Tables are for tabular data.
Google for CSS three column layout. Plenty of examples, or search
through this group for examples.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

She's right u know :)
 

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,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top