Cool, then reload the page ( http://www.kahalawai.com/Pascal.html ) one more time to see how using the :last-child rule cleaned up the code.
The epiphany I had lately regarding HTML is forget the CSS and just create the cleanest HTML possible. Once you have that just work backwards to create the CSS. Aloha Friday, Johnny Miller Kahalawai Media Corp. www.kahalawai.com On Jan 27, 2012, at 9:41 AM, Pascal Robert wrote: > > Le 2012-01-27 à 14:38, Johnny Miller a écrit : > >> C'est rien. You have done plenty for me already. >> >> Comme ca? http://www.kahalawai.com/Pascal.html [reload] > > It's perfect! > >> If you can use CSS3 selectors then the HTML & CSS would be cleaner because >> you could use :last-child to set border to none on the last column and the >> last nested row. > > Now, I need a CSS book (and a good book about designing interfaces for Web > apps)… But yes, the app is for Safari 5.x or Firefox 4 and later (that's one > of the good things about a internal app, you can control which browsers is in > the place). > >> i.e... >> >> .row .row:last-child { >> border: none; >> } >> >> Johnny Miller >> Kahalawai Media Corp. >> www.kahalawai.com >> >> >> >> On Jan 27, 2012, at 9:28 AM, Pascal Robert wrote: >> >>> Yes, this is 95% of what I need :-) The only missing thing is that the >>> second column (the one with A/B) should be "split" (e.g. to have a border >>> to have between A and 5, and a border between 5 and the first text field, >>> and between the two text fields). >>> >>> Do you have a PayPal account so that I can pay you for your help? >>> >>>> Sorry. It's still morning here and once the coffee hit I couldn't put >>>> this down. >>>> >>>> If I understand you correctly, I think this is now right ;) >>>> >>>> http://www.kahalawai.com/Pascal.html >>>> >>>> On Jan 27, 2012, at 7:43 AM, Pascal Robert wrote: >>>> >>>>> Yeah, look like I won't have the choice of calculating the size in a way >>>>> or another. I will try to do it by JavaScript so that at least it's not >>>>> doing a round-trip for nothing. >>>>> >>>>>> Hi Pascal, >>>>>> >>>>>> I think you need to use a nested table. Then on column that has "A" you >>>>>> could set the rowspan = transactions.size >>>>>> >>>>>> HTH, >>>>>> >>>>>> Johnny >>>>>> >>>>>> On Jan 27, 2012, at 5:02 AM, Pascal Robert wrote: >>>>>> >>>>>>> I'm trying to find a way to get a design to work, and I guess I'm >>>>>>> reaching my Web design skills to its limits. Anyway, I have to work on >>>>>>> a form in a table form. The problem is that how I can expand the height >>>>>>> of a <td> or a <div> when I'm inside a WORepetition. See this example: >>>>>>> >>>>>>> <Capture d’écran 2012-01-27 à 09.46.34.png> >>>>>>> >>>>>>> My original design was using a <table>, and inside some <td>, I'm using >>>>>>> a <div> for each sub-row (the "A" and "B"). Problem is, alignment is >>>>>>> not ok. For example, for MEC-1044, A might have four transactions, but >>>>>>> B will show up on the same "line" as the second transaction of A. I >>>>>>> have tried to move to full CSS (e.g., replacing the table with divs) >>>>>>> and I get the same problem. >>>>>>> >>>>>>> I guess when building the list of transactions for A, I could count of >>>>>>> number of nodes and adjust by JavaScript the height of the column for >>>>>>> A. For example, if the default height for A is 25px and it have four >>>>>>> transactions, I could change the height of the A column to 100px. But >>>>>>> that means that I have to check all columns to find what will be the >>>>>>> maximum height. For example, if A don't have any transactions yet but >>>>>>> another column is higher, I will have to use the height for that column. >>>>>>> >>>>>>> Is this something doable, especially in a WORepetition? I never saw a >>>>>>> design like that on the Web, so maybe it's just not possible. >>>>>>> >>>>>>> This is what the table look like on the HTML side: >>>>>>> >>>>>>> <table width="90%"> >>>>>>> </tr> >>>>>>> <wo:loop list="$childsSpec" item="$childSpec"> >>>>>>> <tr valign="top"> >>>>>>> <td class="spec_name" width="150"> >>>>>>> <strong><wo:str value="$childSpec.ID" /></strong> >>>>>>> </td> >>>>>>> <td class="spec_revision"> >>>>>>> <wo:loop list="$revisions" item="$revisionItem"> >>>>>>> <div style="height: 25px; width:100%;"> <wo:str >>>>>>> value="$revisionItem.ID" /> </div> >>>>>>> </wo:loop> >>>>>>> </td> >>>>>>> <td class="spec_stock"> >>>>>>> <wo:loop list="$revisions" item="$revisionItem"> >>>>>>> <wo:loop list="$~availablesPartsForSpec(revisionItem)" >>>>>>> item="$partItem"> >>>>>>> <div style="height: 25px; width:100%;"> <wo:str >>>>>>> value="$partItem.availableQuantity" /> </div> >>>>>>> </wo:loop> >>>>>>> </wo:loop> >>>>>>> </td> >>>>>>> <td class="spec_parts"> >>>>>>> <wo:loop list="$revisions" item="$revisionItem"> >>>>>>> <wo:loop list="$~availablesPartsForSpec(revisionItem)" >>>>>>> item="$partItem"> >>>>>>> <div style="height: 25px; width:100%;"> >>>>>>> <wo:AjaxObserveField updateContainerID="main_table" >>>>>>> action="$~addPartsFromLot(partItem)"> <wo:textfield >>>>>>> value="$quantityToAdd" size="4" numberformat="#" style="padding: 0px; >>>>>>> margin: 0px;" /> </wo:AjaxObserveField> >>>>>>> </div> >>>>>>> </wo:loop> >>>>>>> </wo:loop> >>>>>>> </td> >>>>>>> <td class="spec_manifest"> >>>>>>> <wo:loop list="$revisions" item="$revisionItem"> >>>>>>> <wo:loop list="$~transactionsForSpec(revisionItem)" >>>>>>> item="$specTransactionItem"> >>>>>>> <div style="height: 25px; width:100%;"> >>>>>>> <wo:AjaxObserveField updateContainerID="main_table" >>>>>>> action="$~removeQuantityFromTransaction(specTransactionItem)"> >>>>>>> <span style="margin-right: 10px; >>>>>>> width=40px;"><wo:textfield >>>>>>> value="$specTransactionItem.quantityToRemove" numberformat="#" size="4" >>>>>>> /></span> >>>>>>> <span style="margin-right: 10px;"><wo:str >>>>>>> value="[email protected]@abs(specTransactionItem.quantity)" /></span> >>>>>>> <wo:str value="$specTransactionItem.dateEnd" >>>>>>> dateformat="%Y/%m/%d %H:%M:%S" /> >>>>>>> </wo:AjaxObserveField> >>>>>>> </div> >>>>>>> </wo:loop> >>>>>>> </wo:loop> >>>>>>> </td> >>>>>>> </wo:if> >>>>>>> <td class="spec_quantity"><wo:str >>>>>>> value="$~missingQuantity(childSpec)" /></td> >>>>>>> <td class="spec_required_qty"><wo:str >>>>>>> value="$~spec.requiredQuantityForChild(childSpec)" /></td> >>>>>>> </tr> >>>>>>> </wo:loop> >>>>>>> </table> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Do not post admin requests to the list. They will be ignored. >>>>>>> Webobjects-dev mailing list ([email protected]) >>>>>>> Help/Unsubscribe/Update your Subscription: >>>>>>> https://lists.apple.com/mailman/options/webobjects-dev/jlmiller%40kahalawai.com >>>>>>> >>>>>>> This email sent to [email protected] >>>>>> >>>>> >>>> >>> >> >
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
