[Seaside] [scriptaculous] Why my sliders disapear ?

Lukas Renggli renggli at gmail.com
Mon Jul 28 07:38:13 UTC 2008


>  I have another question, CSS related, when you have such succession of
>  div's or whatever (div#name1 div#name2, ...). Is it possible to
>  declare in one line (in the CSS file)
>
>  div#name[] {
>  }

Yes, you can write:

     div#name1, div#name2 { }

Note that your use of [] is confusing, because there is a similar
construct part of CSS 2.0. I know that you are using it here as a
placeholder for a number.

But again, I suggest not to use IDs for styling. Only use CSS classes
for styling, even if the particular style is only used once.

     .handle { }
     .slider { }

and the html

     html div id: 'slider1'; class: 'slider'; with: [ html div class: 'handle' ]
     html div id: 'slider2'; class: 'slider'; with: [ html div class: 'handle' ]

Like this the IDs you use for the JavaScript don't affect the layout.

Cheers,
Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside mailing list