Re: [WSG] Including CSS with JS

2006-03-29 Thread Christian Montoya
On 3/29/06, CK [EMAIL PROTECTED] wrote:
 Hi,

 Upon closer inspection, it was used to serve alternate styles based
 upon browser window sizes.

That's pretty bad. :( I'm sure others on the list can pose better
methods. I can suggest one: Use a liquid layout with defined min and
max width, and use JS for IE 6 to respect those values.

Or you could do what's going on at http://www.huddletogether.com ,
which doesn't rely on JS at all.

--
--
Christian Montoya
christianmontoya.com ... rdpdesign.com ... cssliquid.com
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



Re: [WSG] Including CSS with JS

2006-03-29 Thread Thierry Koblentz
Ted Drake wrote:
 Hi Thierry
 Wouldn't it be better to have the list items display:block or
 visibility:visible and then change that with javascript as soon as
 the page loads?

 I struggled with this concept on my own site and never solved it. If
 you went in this direction, would it cause the elements to dance
 around as they went from open to close?

Hi Ted,
That's the issue with using the script to hide the elements through the
onload event. Because onload is too late. Elements are already in the
flow when the script remove them.

Regards,
Thierry | www.TJKDesign.com

**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



Re: [WSG] Including CSS with JS

2006-03-29 Thread Thierry Koblentz
matt andrews wrote:
 In which case I'd hide all but the currently-visible element with CSS.
  Presumably you're using progressive enhancement, so the tab links
 (to show non-currently-visible elements) will do full page loads if
 Javascript is not enabled, so you can reveal the appropriate element
 with CSS on the subsequent page load (and hide the previous one).

That's much more work though. Does it worth it? The only advantage I can see
is that in JS challenged UAs, only the related sub-menu would be opened vs.
the whole enchilada.

Regards,
Thierry | www.TJKDesign.com

**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



Re: [WSG] Including CSS with JS

2006-03-29 Thread matt andrews
On 30/03/06, Thierry Koblentz [EMAIL PROTECTED] wrote:
 matt andrews wrote:
  In which case I'd hide all but the currently-visible element with CSS.
   Presumably you're using progressive enhancement, so the tab links
  (to show non-currently-visible elements) will do full page loads if
  Javascript is not enabled, so you can reveal the appropriate element
  with CSS on the subsequent page load (and hide the previous one).

 That's much more work though. Does it worth it? The only advantage I can see
 is that in JS challenged UAs, only the related sub-menu would be opened vs.
 the whole enchilada.

That, and also that you don't get weird visual effects during load
*with* a Javascript-enabled UA.
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



Re: [WSG] Including CSS with JS

2006-03-29 Thread Thierry Koblentz
matt andrews wrote:
 On 30/03/06, Thierry Koblentz [EMAIL PROTECTED] wrote:
 matt andrews wrote:
 In which case I'd hide all but the currently-visible element with
  CSS. Presumably you're using progressive enhancement, so the tab
 links (to show non-currently-visible elements) will do full page
 loads if Javascript is not enabled, so you can reveal the
 appropriate element with CSS on the subsequent page load (and hide
 the previous one).

 That's much more work though. Does it worth it? The only advantage I
 can see is that in JS challenged UAs, only the related sub-menu
 would be opened vs. the whole enchilada.

 That, and also that you don't get weird visual effects during load
 *with* a Javascript-enabled UA.

But using JS to plug the sheet, as suggested earlier, takes care of that
issue. Much less work, good result.

Regards,
Thierry | www.TJKDesign.com

**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**