I have a huge pile of open-source PHP, far too big for me to
wrestle it into submission. It generates nested tables
MANY layers deep.
What I am trying to do is extract several small pieces from it and put
each of those in a box (in a new file) and arrange those boxes my way.
The layout I want is (you'll need fixed width font):
+-----+-----+-----+-----+
| PGF | PGM | MGF | MGM |
+-----+-----+-----+-----+
| father | mother |
+-----------+-----------+
| child |
+-----------------------+
| child |
+-----------------------+
The stuff in the boxes is very complicated and also includes nested
tables, but I was hoping that making these boxes out of divs, I could
put boundaries on the pieces and then clean them up later.
So the divs, without contents, are
<div class="FGS">
<div class="grandpar ents" -->
<div class="PGP">
<div class="PGF">
</div><!-- class="PGF" -->
<div class="PGM">
</div><!-- class="PGM" -->
</div><!-- class="PGP" -->
<div class="MGP">
<div class="MGF">
</div><!-- class="MGF" -->
<div class="MGM">
</div><!-- class="MGM" -->
</div><!-- class="MGP" -->
</div><!-- class="grandpar ents" -->
<div class="parents" >
<div class="father">
</div><!-- class="father" -->
<div class="mother">
</div><!-- class="mother" -->
</div><!-- class="parents" -->
<div class="children ">
</div><!-- class="children " -->
</div><!-- class="FGS" -->
Here's the CSS I tried (in FireFox on Mac), but all these divs are
stacked up in a single vertical column:
..FGS, .grandparents, .parents, .children, .child
{
width: 100%;
margin: 0;
padding: 0;
}
..PGF, .PGM, .MGF, .MGM
{
width: 25%;
margin: 0;
padding: 0;
}
..father, .mother, .PGP, .MGP
{
width: 50%;
margin: 0;
padding: 0;
}
..PGF, .MGF, .father
{
float: left;
}
..PGM, .MGM, . mother
{
float: right;
}
Obviously trivial to do with a table, but I'd rather not.
Thanks!
--
Wes Groleau
Nobody believes a theoretical analysis -- except the guy who did it.
Everybody believes an experimental analysis -- except the guy who
did it.
-- Unknown
wrestle it into submission. It generates nested tables
MANY layers deep.
What I am trying to do is extract several small pieces from it and put
each of those in a box (in a new file) and arrange those boxes my way.
The layout I want is (you'll need fixed width font):
+-----+-----+-----+-----+
| PGF | PGM | MGF | MGM |
+-----+-----+-----+-----+
| father | mother |
+-----------+-----------+
| child |
+-----------------------+
| child |
+-----------------------+
The stuff in the boxes is very complicated and also includes nested
tables, but I was hoping that making these boxes out of divs, I could
put boundaries on the pieces and then clean them up later.
So the divs, without contents, are
<div class="FGS">
<div class="grandpar ents" -->
<div class="PGP">
<div class="PGF">
</div><!-- class="PGF" -->
<div class="PGM">
</div><!-- class="PGM" -->
</div><!-- class="PGP" -->
<div class="MGP">
<div class="MGF">
</div><!-- class="MGF" -->
<div class="MGM">
</div><!-- class="MGM" -->
</div><!-- class="MGP" -->
</div><!-- class="grandpar ents" -->
<div class="parents" >
<div class="father">
</div><!-- class="father" -->
<div class="mother">
</div><!-- class="mother" -->
</div><!-- class="parents" -->
<div class="children ">
</div><!-- class="children " -->
</div><!-- class="FGS" -->
Here's the CSS I tried (in FireFox on Mac), but all these divs are
stacked up in a single vertical column:
..FGS, .grandparents, .parents, .children, .child
{
width: 100%;
margin: 0;
padding: 0;
}
..PGF, .PGM, .MGF, .MGM
{
width: 25%;
margin: 0;
padding: 0;
}
..father, .mother, .PGP, .MGP
{
width: 50%;
margin: 0;
padding: 0;
}
..PGF, .MGF, .father
{
float: left;
}
..PGM, .MGM, . mother
{
float: right;
}
Obviously trivial to do with a table, but I'd rather not.
Thanks!
--
Wes Groleau
Nobody believes a theoretical analysis -- except the guy who did it.
Everybody believes an experimental analysis -- except the guy who
did it.
-- Unknown
Comment