Re: [WebDNA] Styling search results [using css]

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 102388
interpreted = N
texte = I am really short on time, so the fastest way to verify that it works was= for me to code up a=20 [listfiles], since a loop is a loop is a loop... COLUMN 1
------------------
[listwords words=3D1,2,3,4,5,6,7,8,9,10] [hideif [index]\2][word][/hideif]
[/listwords]

COLUMN 2
------------------
[listwords words=3D1,2,3,4,5,6,7,8,9,10] [showif [index]\2][word][/showif]
[/listwords] On Fri, 10 Apr 2009 11:47:17 -0700 "Dan Strong" wrote: > That makes no sense. >=20 >=20 >=20 > On Fri, 10 Apr 2009 11:19:53 -0700 > Chris Wilkinson wrote: >> Thanks Dan... Odd results with this method, it yielded: >>=20 >> 2 2 >> 4 4 >>=20 >> So, how do I get to? >>=20 >> 1 2 >> 3 4 >>=20 >> Thanks, >> -Chris >>=20 >> On 4/9/09 2:24 PM, "Dan Strong" wrote: >>=20 >>> Assuming you've got the columns working as expected (I haven't checke= d), one >>> way is: >>>=20 >>> [search db=3Ddata.db] >>>
>>> [founditems] >>> [hideif [index]\2] >>> >>>

[data]

>>> [/hideif] >>> [/founditems] >>>
>>>=20 >>>
>>> [founditems] >>> [showif [index]\2] >>> >>>

[data]

>>> [/showif] >>> [/founditems] >>>
>>> [/search] >>>=20 >>>=20 >>> On Thu, 09 Apr 2009 13:39:04 -0700 >>> "cw@e-wave.net" wrote: >>>> Thanks Michael.=20 >>>>=20 >>>> Any idea how to do it without using tables - just CSS? Maybe this is= one of >>>> those times to compromise, but I really need to avoid tables unless = I am >>>> displaying tabular data. >>>>=20 >>>> Thanks, >>>> -Chris >>>>=20 >>>> On 4/9/09 10:52 AM, "Michael A. DeLorenzo" wrote: >>>>=20 >>>>> I use something like this frequently. I forgot if I wrote this code= or if I >>>>> changed someone else's to work for my purpose. In any case, it work= s :) >>>>>=20 >>>>> BTW...This is for 3 col output. Just change the number in the math = var to >>>>> the number you need. >>>>>=20 >>>>>=20 >>>>> [search db=3D../dbs/member.db&neskudatarq=3D0&lastNamesort=3D1&last= NameType=3Dtext] >>>>> [math show=3Df]cols=3Dceil([numfound]/3)[/math] >>>>> [math show=3Df]offset=3Dcols[/math] >>>>> >>>>> [loop start=3D1&end=3D[cols]] >>>>> [math show=3Df]offset=3Doffset-1[/math] >>>>> [founditems] >>>>> [showif [math]([index]+[offset])\[cols][/math]=3D1] >>>>> >>>>> [/showif] >>>>> [/founditems] >>>>> [/loop] >>>>>
>>>>> [namePrefix] [firstName] [middleInitial][hideif [middleInitial]=3D]= .[/hideif] >>>>> [lastName] [namesuffix] [hideif [nickName]=3D]([nickName])[/hideif]= >>>>>
[/search] >>>>>=20 >>>>>=20 >>>>>=20 >>>>> Michael=20 >>>>>=20 >>>>> -----Original Message----- >>>>> From: cw@e-wave.net [mailto:cw@e-wave.net] >>>>> Sent: Thursday, April 09, 2009 1:17 PM >>>>> To: talk@webdna.us >>>>> Subject: [WebDNA] Styling search results >>>>>=20 >>>>> So, my search works when I just list the results in a single column= and the >>>>> CSS layout works with static data. But, what I need to do is to dis= play 2 >>>>> columns (or rows) of results, like this: >>>>>=20 >>>>> 1 3 >>>>> 2 4 >>>>>=20 >>>>> or: >>>>>=20 >>>>> 1 2 >>>>> 3 4 >>>>>=20 >>>>> Any suggestions are greatly appreciated. >>>>>=20 >>>>> Thanks, >>>>> -Chris >>>>> -------------------------- >>>>>=20 >>>>> css: >>>>>=20 >>>>> #box{ >>>>> width:690px; >>>>> overflow:hidden; >>>>> } >>>>> #box li{ >>>>> float:left; >>>>> width:350px; >>>>> overflow:hidden; >>>>> } >>>>> #box .col2{ >>>>> width:340px; >>>>> } >>>>> #box li img{ >>>>> float:left; >>>>> } >>>>> #box li .breif{ >>>>> float:left; >>>>> width:230px; >>>>> } >>>>>=20 >>>>>=20 >>>>> code: >>>>>=20 >>>>> >>>>> =20 >>>>> ### >>>>=20 >>>>=20 >>>> --------------------------------------------------------- >>>> This message is sent to you because you are subscribed to >>>> the mailing list . >>>> To unsubscribe, E-mail to: >>>> archives: http://mail.webdna.us/list/talk@webdna.us >>>> old archives: http://dev.webdna.us/TalkListArchive/ >>>=20 >>> --------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us >>> old archives: http://dev.webdna.us/TalkListArchive/ >>>=20 >>=20 >>=20 >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> old archives: http://dev.webdna.us/TalkListArchive/ >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Styling search results [using css] (Chris Wilkinson 2009)
  2. RE: [WebDNA] Styling search results [using css] ("Olin Lagon" 2009)
  3. Re: [WebDNA] Styling search results [using css] (Donovan Brooke 2009)
  4. Re: [WebDNA] Styling search results [using css] (Donovan Brooke 2009)
  5. Re: [WebDNA] Styling search results [using css] (William DeVaul 2009)
  6. Re: [WebDNA] Styling search results [using css] ("Dan Strong" 2009)
  7. Re: [WebDNA] Styling search results [using css] ("Dan Strong" 2009)
  8. Re: [WebDNA] Styling search results [using css] (Chris Wilkinson 2009)
  9. Re: [WebDNA] Styling search results [using css] (Chris Wilkinson 2009)
  10. Re: [WebDNA] Styling search results [using css] (William DeVaul 2009)
  11. Re: [WebDNA] Styling search results [using css] ("Dan Strong" 2009)
  12. Re: [WebDNA] Styling search results [using css] ("Dan Strong" 2009)
  13. Re: [WebDNA] Styling search results [using css] ("cw@e-wave.net" 2009)
I am really short on time, so the fastest way to verify that it works was= for me to code up a=20
[listfiles], since a loop is a loop is a loop... COLUMN 1
------------------
[listwords words=3D1,2,3,4,5,6,7,8,9,10] [hideif [index]\2][word][/hideif]
[/listwords]

COLUMN 2
------------------
[listwords words=3D1,2,3,4,5,6,7,8,9,10] [showif [index]\2][word][/showif]
[/listwords] On Fri, 10 Apr 2009 11:47:17 -0700 "Dan Strong" wrote: > That makes no sense. >=20 >=20 >=20 > On Fri, 10 Apr 2009 11:19:53 -0700 > Chris Wilkinson wrote: >> Thanks Dan... Odd results with this method, it yielded: >>=20 >> 2 2 >> 4 4 >>=20 >> So, how do I get to? >>=20 >> 1 2 >> 3 4 >>=20 >> Thanks, >> -Chris >>=20 >> On 4/9/09 2:24 PM, "Dan Strong" wrote: >>=20 >>> Assuming you've got the columns working as expected (I haven't checke= d), one >>> way is: >>>=20 >>> [search db=3Ddata.db] >>>
>>> [founditems] >>> [hideif [index]\2] >>> >>>

[data]

>>> [/hideif] >>> [/founditems] >>>
>>>=20 >>>
>>> [founditems] >>> [showif [index]\2] >>> >>>

[data]

>>> [/showif] >>> [/founditems] >>>
>>> [/search] >>>=20 >>>=20 >>> On Thu, 09 Apr 2009 13:39:04 -0700 >>> "cw@e-wave.net" wrote: >>>> Thanks Michael.=20 >>>>=20 >>>> Any idea how to do it without using tables - just CSS? Maybe this is= one of >>>> those times to compromise, but I really need to avoid tables unless = I am >>>> displaying tabular data. >>>>=20 >>>> Thanks, >>>> -Chris >>>>=20 >>>> On 4/9/09 10:52 AM, "Michael A. DeLorenzo" wrote: >>>>=20 >>>>> I use something like this frequently. I forgot if I wrote this code= or if I >>>>> changed someone else's to work for my purpose. In any case, it work= s :) >>>>>=20 >>>>> BTW...This is for 3 col output. Just change the number in the math = var to >>>>> the number you need. >>>>>=20 >>>>>=20 >>>>> [search db=3D../dbs/member.db&neskudatarq=3D0&lastNamesort=3D1&last= NameType=3Dtext] >>>>> [math show=3Df]cols=3Dceil([numfound]/3)[/math] >>>>> [math show=3Df]offset=3Dcols[/math] >>>>> >>>>> [loop start=3D1&end=3D[cols]] >>>>> [math show=3Df]offset=3Doffset-1[/math] >>>>> [founditems] >>>>> [showif [math]([index]+[offset])\[cols][/math]=3D1] >>>>> >>>>> [/showif] >>>>> [/founditems] >>>>> [/loop] >>>>>
>>>>> [namePrefix] [firstName] [middleInitial][hideif [middleInitial]=3D]= .[/hideif] >>>>> [lastName] [namesuffix] [hideif [nickName]=3D]([nickName])[/hideif]= >>>>>
[/search] >>>>>=20 >>>>>=20 >>>>>=20 >>>>> Michael=20 >>>>>=20 >>>>> -----Original Message----- >>>>> From: cw@e-wave.net [mailto:cw@e-wave.net] >>>>> Sent: Thursday, April 09, 2009 1:17 PM >>>>> To: talk@webdna.us >>>>> Subject: [WebDNA] Styling search results >>>>>=20 >>>>> So, my search works when I just list the results in a single column= and the >>>>> CSS layout works with static data. But, what I need to do is to dis= play 2 >>>>> columns (or rows) of results, like this: >>>>>=20 >>>>> 1 3 >>>>> 2 4 >>>>>=20 >>>>> or: >>>>>=20 >>>>> 1 2 >>>>> 3 4 >>>>>=20 >>>>> Any suggestions are greatly appreciated. >>>>>=20 >>>>> Thanks, >>>>> -Chris >>>>> -------------------------- >>>>>=20 >>>>> css: >>>>>=20 >>>>> #box{ >>>>> width:690px; >>>>> overflow:hidden; >>>>> } >>>>> #box li{ >>>>> float:left; >>>>> width:350px; >>>>> overflow:hidden; >>>>> } >>>>> #box .col2{ >>>>> width:340px; >>>>> } >>>>> #box li img{ >>>>> float:left; >>>>> } >>>>> #box li .breif{ >>>>> float:left; >>>>> width:230px; >>>>> } >>>>>=20 >>>>>=20 >>>>> code: >>>>>=20 >>>>> >>>>> =20 >>>>> ### >>>>=20 >>>>=20 >>>> --------------------------------------------------------- >>>> This message is sent to you because you are subscribed to >>>> the mailing list . >>>> To unsubscribe, E-mail to: >>>> archives: http://mail.webdna.us/list/talk@webdna.us >>>> old archives: http://dev.webdna.us/TalkListArchive/ >>>=20 >>> --------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us >>> old archives: http://dev.webdna.us/TalkListArchive/ >>>=20 >>=20 >>=20 >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> old archives: http://dev.webdna.us/TalkListArchive/ >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ "Dan Strong"

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

WebCatalog and Filemaker (1996) [WriteFile] problems (1997) Req for code: upload and append to DB (2002) unsubscribe (2000) Adding Message to Order (1997) PCS Customer submissions ? (1997) WebSTAR 2.1 freezes my Mac (1997) WebCat2.0 [format thousands .0f] no go (1997) looking for some paid WebCatalog help (2000) Deleting with contexts (2001) Is this possible in simple search? question? (1998) [WebDNA] Installing WebDNA 7 on OSX Mavericks Server - Instructions (2014) Error Lob.db records error message not name (1997) Why is deleting so slow? (2002) The beginning (1997) in conversions.db crashes unix webcat (1999) Still can't upgrade users.db to 2.1.1 (1998) Template transformed itself into a database? (1998) bug? template caching and apache transfer byte log (1999) Greeting Card System (2000)