![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
PGF | PGM | MGF | MGM | +-----+-----+-----+-----+ father | mother | +-----------+-----------+ child | +-----------------------+ child | +-----------------------+ |
#2
| |||
| |||
|
|
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 | +-----------------------+ .... div class="grandparents" -- div class="PGP" Obviously trivial to do with a table, but I'd rather not. |
#3
| |||
| |||
|
|
Wes Groleau <groleau+news (AT) freeshell (DOT) org> wrote: 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. ... div class="grandparents" -- div class="PGP" Obviously trivial to do with a table, but I'd rather not. First why would you rather not use a table? Second, if you are |
|
going to post masses of code, why would you not post code that did something rather than be hopelessly invalid. And third, what possible benefit are the (wrongly coded) comments for? Of course |
#4
| |||
| |||
|
|
dorayme wrote: Wes Groleau <groleau+news (AT) freeshell (DOT) org> wrote: 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. ... div class="grandparents" -- div class="PGP" Obviously trivial to do with a table, but I'd rather not. First why would you rather not use a table? Second, if you are The answer to that (besides the usual rants about confusing blind people) is in that first paragraph. |
|
going to post masses of code, why would you not post code that did something rather than be hopelessly invalid. And third, what possible benefit are the (wrongly coded) comments for? Of course Hopelessly invalid? Wrong comments? Yes, the obvious div you quoted is a typo. Maybe even the reason it didn't work. But all the rest of the comments correctly identify the div they are ending. A very important coding convention if you want any hope of dealing with "spaghetti HTML" generated by someone else's "spaghetti PHP" |
#5
| |||
| |||
|
|
So? Why does this preclude you using a table for selected data in a separate file considering it looks rather like tabular data you |
|
are dealing with? I recall there being a relationship between the cells, perhaps you might argue it is not really tabular in spite of the appearance? |
|
Don't get upset. I did not mean to offend you (perhaps I was not liking having to stay in Sunday yesterday to meet a Monday deadline <g>) |
#6
| |||
| |||
|
|
dorayme wrote: So? Why does this preclude you using a table for selected data in a separate file considering it looks rather like tabular data you It doesn't. But I'd still like to understand the CSS & div issue. are dealing with? I recall there being a relationship between the cells, perhaps you might argue it is not really tabular in spite of the appearance? If you look at http://UniGen.us/PGV/FGS?famid=F25&ged=wgroleau compared to [1] http://UniGen.us/PGV/FGS-div?famid=F25&ged=wgroleau you will see how the parents and grandparents were arranged in the old version. If you view source, you will see, though "spaghetti" might be hyperbole, why I want to simplify this thing. Of course you won't be able to see how complicated the PHP is unless you download it from www.phpgedview.net The original version is http://UniGen.us/PGV/family?famid=F25&ged=wgroleau Although a case could be made that it is tabular, the original (and many other parts of the code) uses much more complicated tables to produce layouts that are not tabular (e.g., the pedigree tree). I want to figure out ways to simpify it that will still allow using non-tabular formats without excessive tables. |
#7
| |||||
| |||||
|
|
OK I had a quick look at the two urls you mention above and they so little separate content from style that I had trouble getting to the heart of the issue that concerns you. I will try to find |
|
Take some bit that is presently laid out with tables, that is not obviously tabular data in itself, and post a url to it and it |
|
The original version is http://UniGen.us/PGV/family?famid=F25&ged=wgroleau alone (ie. make a test case). And then ask how it could be done without tables. I can assure you, you will get plenty of help |
|
In a big table (that should be a table) the contents of the cells are not necessarily further tables. For example, I might have a |
|
In a way, it really is a simple matter. Do not even try to do without tables where tables are the right tool for the job. They are the right tool whenever there is tabular relationships needing to be exhibited. If you try to do without them because you think you will simplify something, you will probably fail on |
#8
| |||
| |||
|
|
dorayme wrote: OK I had a quick look at the two urls you mention above and they so little separate content from style that I had trouble getting to the heart of the issue that concerns you. I will try to find That IS the issue that concerns me! :-) Take some bit that is presently laid out with tables, that is not obviously tabular data in itself, and post a url to it and it I did: The original version is http://UniGen.us/PGV/family?famid=F25&ged=wgroleau |
|
PGF | PGM | MGF | MGM | +-----+-----+-----+-----+ father | mother | +-----------+-----------+ child | +-----------------------+ child | +-----------------------+ |
|
alone (ie. make a test case). And then ask how it could be done without tables. I can assure you, you will get plenty of help But I don't want to do _that_ without tables. I don't want to do that at all. In a big table (that should be a table) the contents of the cells are not necessarily further tables. For example, I might have a Of course. But I am trying to clean up a messy house, one room at a time, while living in it. I don't have the luxury of burning it down and building a new one. In a way, it really is a simple matter. Do not even try to do without tables where tables are the right tool for the job. They are the right tool whenever there is tabular relationships needing to be exhibited. If you try to do without them because you think you will simplify something, you will probably fail on What I said was, I'd like to to do an arrangement of these people without tables for two reasons: 1. To learn how to do it where I can see the "big picture" in a few dozen lines, rather than the much more complicated subroutines that I'll tackle later. 2. Because, although my arrangement looks tabular--and it could be argued that it _is_ tabular--the original arrangement of the same boxes, the family "tree," is just as logical, and I would like to allow people to switch to that with as much work as possible in the CSS, not in the code. |
#9
| |||
| |||
|
|
Lets go back to the original request: +-----+-----+-----+-----+ | PGF | PGM | MGF | MGM | +-----+-----+-----+-----+ | father | mother | +-------- [snip] -------+ Short lesson in float: left; And just take the top row. div class="row" div class="GF_GM">PGF</div div class="GF_GM">PGM</div div class="GF_GM">MGF</div div class="GF_GM">MGM</div div style="clear: both">use this div to give the row height, if you need it, other tricks available</div /div styles would look like; .row{clear: both} /* keeps "rows" from stacking wrong */ .GF_GM{ float: left; |
|
Height! You will probably want all the "boxes" to be the same height. |
![]() |
| Thread Tools | |
| Display Modes | |
| |