Re: [WSG] Set min-width using DOM
Thierry Koblentz said: Ian Rifkin wrote: It won't work if javascript is off. I'm not sure about that. I believe it still works with script disabled. It does up until XP SP2 where they changed the rules A site will have to be trusted for CSS expression to work where JS is off. kind regards Terrence Wood. ** 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] Set min-width using DOM
Terrence Wood wrote: Thierry Koblentz said: Ian Rifkin wrote: It won't work if javascript is off. I'm not sure about that. I believe it still works with script disabled. It does up until XP SP2 where they changed the rules A site will have to be trusted for CSS expression to work where JS is off. That's not correct. We have several test boxes running all flavors of Windows and IE in default mode and disabling script always disables expressions. Al Sparber PVII http://www.projectseven.com Designing with CSS is sometimes like barreling down a crumbling mountain road at 90 miles per hour secure in the knowledge that repairs are scheduled for next Tuesday. ** 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] Set min-width using DOM
On Sat, 22 Oct 2005 00:53:51 -0400, Christian Montoya wrote: width:740px; expression( fluid and max-width stuff ) Logically, I would expect this to work. Set the width to 740, then reset it with the expression. If the expression is inoperative then voila, its set to 740 I don't have time to test this today, however :( Lea -- Lea de Groot Elysian Systems - http://elysiansystems.com/ Brisbane, Australia ** 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] Set min-width using DOM
On 22 Oct 2005, at 2:53 pm, Lea de Groot wrote: On Sat, 22 Oct 2005 00:53:51 -0400, Christian Montoya wrote: width:740px; expression( fluid and max-width stuff ) Logically, I would expect this to work. Set the width to 740, then reset it with the expression. If the expression is inoperative then voila, its set to 740 Yes, that is the solution I've been using for a while, and seems to work fine. selector { width:740px; width:expression(...); } (all dumped inside of a conditional comment, of course). Philippe --- Philippe Wittenbergh http://emps.l-c-n.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] Set min-width using DOM
I won't blush too hard if you mention my name. ;) If you let me know when it's up that'd be great too. Really, though, I didn't create anything new, I just applied it. The current test URL is here - http://d81314.i50.quadrahosting.com.au/ - but please don't check the site for validation. I've just intriduced a claendar module that produces some of the most horrid URL and code I've ever seen. Which leads me to my next question. Anyone know of a calendar solution using PHP that creates clean code? And if you resize the site's window you may notice the centre column's content disapperas/drops from view. I've applied various new wave clearing solutions but it still does it. Any ideas? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christian Montoya Sent: Friday, 21 October 2005 3:46 PM To: wsg@webstandardsgroup.org Subject: Re: [WSG] Set min-width using DOM Thanks guys, that answers all my questions. @ Paul: Could you please give a link to your website where this is now working? Also, I'd like to add this as a resource to Liquid Designs. Will you be writing something on this, or could I just write something and give the credit to you? ** 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] Set min-width using DOM
Thierry Koblentz skrev: Ian Rifkin wrote: The min-width was set using CSS expressions which only works in IE. It actually is javascript that makes it work, but it goes in the CSS (inline or external stylesheet). It won't work if javascript is off. I'm not sure about that. I believe it still works with script disabled. In Windows XP it did work with scripting disabled, but that was before SP2! By wrapping a value in expression() you can make it work only when scripting is enabled. Like this: #logotype { z-index: 5; /* scripting disabled */ } #logotype { z-index: expression(20); /* override when scripting is enabled */ } /AndersN ** 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] Set min-width using DOM
o.k., so how do you go about setting both max- and min-width at the same time? I tried: width:80%; max-width:600px; min-width:400px; width:expression(((document.documentElement.clientWidth)) 500 ? '400px' : '80%'); width:expression(((document.documentElement.clientWidth)) 750 ? '600px' : '80%'); And needless to say only the second expression got evaluated So, I tried (remove line breaks where required): width:80%; max-width:600px; min-width:400px; width:expression((document.documentElement.clientWidth 500) ? '400px' : ((document.documentElement.clientWidth 750) ? '600px' : '80%')); Bingo! Only works in IE 6, and only if 'active scripting' is enabled - at least on Win 2k sp4 anyway... cheers, Geoff. N���.�Ȩ�X���+��i��n�Z�֫v�+��h��y�m�쵩�j�l��.f���.�ץ�w�q(��b��(��,�)උazX����)��
Re: [WSG] Set min-width using DOM
Paul Thankyou for that, it will be very usefull for a couple of projects I have. The current test URL is here - http://d81314.i50.quadrahosting.com.au/ - One word of warning in IE6 at about 960px wide browser window the centre content drops below the calendar. It only happens in a small range say 950 to 970 pixels wide. Which leads me to my next question. Anyone know of a calendar solution using PHP that creates clean code? I would look at the one that comes with wordpress: http://wordpress.org it does nice valid code. -- Nick Cowie http://nickcowie.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] Set min-width using DOM
From: Thierry Koblentz [EMAIL PROTECTED] I'm not sure about that. I believe it still works with script disabled. It doesn't. But if script is used to enhance a web page, rather than the page being dependent on the script, it is not an issue - and very few people run IE with script disabled. Here is another approach, using a function called by an expression. We use this technique quite a bit: http://www.projectseven.com/csslab/testing/minmax/cssp.htm Al Sparber PVII http://www.projectseven.com Designing with CSS is sometimes like barreling down a crumbling mountain road at 90 miles per hour secure in the knowledge that repairs are scheduled for next Tuesday. ** 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] Set min-width using DOM
From: Lachlan Hardy [EMAIL PROTECTED] Would something like this be appropriate and still validate? Conditional comments only validate in the sense that the validator doesn't recognise them as anything other than comments and hence ignores the content. So, your page will validate against automated checking, but technically you are using invalid code That's a real stretch :-) How about the typical parsing bugs that CSS geeks tend to use - are those better because they eek through da Validator even though they leverage programming bugs in browsers? Conditional Comments are a clean and safe way to address IE Windows issues. Those who use them, who have used them, will have minimal or no issues once IE7 is released. You can bank on that. Al Sparber PVII http://www.projectseven.com Designing with CSS is sometimes like barreling down a crumbling mountain road at 90 miles per hour secure in the knowledge that repairs are scheduled for next Tuesday. ** 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] Set min-width using DOM
Al Sparber wrote: Conditional comments only validate in the sense that the validator doesn't recognise them as anything other than comments and hence ignores the content. So, your page will validate against automated checking, but technically you are using invalid code That's a real stretch :-) How about the typical parsing bugs that CSS geeks tend to use - are those better because they eek through da Validator even though they leverage programming bugs in browsers? Howdy, I don't disagree with you often, but I do in this case. I don't see his view as a stretch at all; I think he is bang on. Conditional comments, which I do prefer to the more often used hacks, are not part of any standard, which makes them invalid markup by nature. There is no way to argue that point validation or otherwise. Some hacks that leverage programming bugs in browsers are opportunistic (and perhaps overly optimistic), but they remain valid CSS. Using this method could *possibly* cause problems with browsers of the future, but then again, so could conditional comments. Also, some developers ritually abuse conditional comments by adding invalid CSS or expressions to their IE style sheets because they know the validator won't catch them. True CSS geeks make sure all of their CSS validates; not just the stuff the validator can see. Conditional Comments are a clean and safe way to address IE Windows issues. Those who use them, who have used them, will have minimal or no issues once IE7 is released. You can bank on that. I agree: CC's are /currently/ the cleanest and safest way to deal with IE Win issues, but they are not infallible or 100% future proof. Allot depends on factors we probably haven't even considered yet. For example, (and this really might be a stretch :))there are allot of folks who have fixed an across the board IE issue by isolating specific CSS to all versions of IE using just !--[if IE]. In this case, if IE 7 (assuming whatever bug I was using the CC's to hack has been fixed) gets the primary CSS right, but is still being fed the alternate style sheet, I'd have to go back and break that CSS out somehow or change the expression in my CC's. Depending on how things are set up, that could be allot of work in its own right. In the same scenario as above, if I used the * html hack to achieve my goal and IE 7 doesn't recognize * html (I believe that is the rumor), then I have to change nothing--all should continue to work and be happy. The truth (at least my version of it :)) is, I can't bank on anything yet and I won't know how things are going to actually play out until I have a browser in which to test them. For the most part though, I do believe those of us using CC's will encounter fewer issues. Best regards, Michael Wilson ** 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] Set min-width using DOM
Michael Wilson wrote: Al Sparber wrote: Conditional comments only validate in the sense that the validator doesn't recognise them as anything other than comments and hence ignores the content. So, your page will validate against automated checking, but technically you are using invalid code That's a real stretch :-) How about the typical parsing bugs that CSS geeks tend to use - are those better because they eek through da Validator even though they leverage programming bugs in browsers? Howdy, I don't disagree with you often, but I do in this case. I don't see his view as a stretch at all; I think he is bang on. Conditional comments, which I do prefer to the more often used hacks, are not part of any standard, which makes them invalid markup by nature. There is no way to argue that point validation or otherwise. Hi Michael, From a purely technical perspective, I stand corrected (I think). However, comments are just that - comments. That Microsoft chose to provide a means for targeting specific versions of its browser, is merely a feature which can be used for myriad puproses, one of which is to deliver curative or even proprietary CSS. My delivering of a proprietary expression with this feature can be construed as counter to the mission of those who advocate a rigid adherence to standards - but I'm not rigid. My goal is to deliver the best web pages I can and if it's a question of allowing IE to fail in whole, or in part, for the greater good of absolute standards conformance, then my position is that a working web page is more important than a valid one. But we are splitting hairs to the extent that someone with less than a perfect understanding of both filter hacks and conditional comments could come away thinking that conditional comments are unclean. Be that as it may, conditional comments and even proprietary expressions are good things to have in one's arsenal. Your example of a global IE version vector simply describes a poor approach to deployment, just as many filter hack implementations could cause problems, so too could a mis-application of conditional comments. We teach people to use specific vectors to ensure forward compatibility - which is, in conclusion, impossible with an exclusive reliance on filter hacks. Regards, Al Sparber PVII http://www.projectseven.com Designing with CSS is sometimes like barreling down a crumbling mountain road at 90 miles per hour secure in the knowledge that repairs are scheduled for next Tuesday. ** 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] Set min-width using DOM
Al Sparber wrote: From: Thierry Koblentz [EMAIL PROTECTED] I'm not sure about that. I believe it still works with script disabled. It doesn't. http://www.positioniseverything.net/articles/sidepages/jello-piefecta-clean.html Says: The upper limit is enforced by a max-width on #sizer, and IEwin is included via an expression hidden in a Conditional Comment in the head. While this is a script, the user cannot disable this type of CSS expression when disabling JavaScript. That's why I said I was not sure... ;) 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] Set min-width using DOM
Thierry Koblentz wrote: Al Sparber wrote: From: Thierry Koblentz [EMAIL PROTECTED] I'm not sure about that. I believe it still works with script disabled. It doesn't. http://www.positioniseverything.net/articles/sidepages/jello-piefecta-clean.html Says: The upper limit is enforced by a max-width on #sizer, and IEwin is included via an expression hidden in a Conditional Comment in the head. While this is a script, the user cannot disable this type of CSS expression when disabling JavaScript. That's why I said I was not sure... ;) Test it yourself and let me know the results. Our testing in the past has indicated that script is script and requires the client-side engine to be running. If I'm wrong, I'd actually be happy to know our testing in the past on this issue was incorrect. -- Al ** 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] Set min-width using DOM
Thierry Koblentz wrote: http://www.positioniseverything.net/articles/sidepages/jello-piefecta-clean.html Says: The upper limit is enforced by a max-width on #sizer, and IEwin is included via an expression hidden in a Conditional Comment in the head. While this is a script, the user cannot disable this type of CSS expression when disabling JavaScript. That's why I said I was not sure... ;) I just tested the following page in IE6. With script enabled, the min-width expression does its job. If I disable JavaScript, the expression no longer works: http://www.projectseven.com/products/menusystems/pmm/pagepacks/utopia/vertical_liquid.htm -- Al ** 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] Set min-width using DOM
Thierry Koblentz wrote: http://www.positioniseverything.net/articles/sidepages/jello-piefecta-clean.html Says: The upper limit is enforced by a max-width on #sizer, and IEwin is included via an expression hidden in a Conditional Comment in the head. While this is a script, the user cannot disable this type of CSS expression when disabling JavaScript. http://www.positioniseverything.net/articles/sidepages/jello-piefecta-clean.html With script disabled in IE6, the expression on the above page does not work. -- Al ** 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] Set min-width using DOM
Al Sparber wrote: Thierry Koblentz wrote: http://www.positioniseverything.net/articles/sidepages/jello-piefecta-clean.html Says: The upper limit is enforced by a max-width on #sizer, and IEwin is included via an expression hidden in a Conditional Comment in the head. While this is a script, the user cannot disable this type of CSS expression when disabling JavaScript. http://www.positioniseverything.net/articles/sidepages/jello-piefecta-clean.html With script disabled in IE6, the expression on the above page does not work. It seems to work fine for me, Yours doesn't: http://www.projectseven.com/products/menusystems/pmm/pagepacks/utopia/vertical_liquid.htm WinXP IE 6.0.28 SP1 WinXP IE 6.0.29 SP2 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] Set min-width using DOM
http://www.positioniseverything.net/articles/sidepages/jello-piefecta-clean.html With script disabled in IE6, the expression on the above page does not work. It seems to work fine for me, It most certainly does not work. Look closely, the page is a mess to begin with so it's hard to see. ** 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] Set min-width using DOM
Al Sparber wrote: http://www.positioniseverything.net/articles/sidepages/jello-piefecta-clean.html With script disabled in IE6, the expression on the above page does not work. It seems to work fine for me, It most certainly does not work. Look closely, the page is a mess to begin with so it's hard to see. I've just checked the CSS file and found out that the min-width is done through padding on body, *not* through an expression. But I was checking for a min-width behavior, no wonder it worked fine without JS... Duh! It's the statement on PIE While this is a script, the user cannot disable this type of CSS expression when disabling JavaScript. that put my brain in a Jello state ;) Thanks for trying so hard to convince me, now I'm *sure* it doesn't work... 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] Set min-width using DOM
Thierry Koblentz wrote: Al Sparber wrote: http://www.positioniseverything.net/articles/sidepages/jello-piefecta-clean.html With script disabled in IE6, the expression on the above page does not work. It seems to work fine for me, It most certainly does not work. Look closely, the page is a mess to begin with so it's hard to see. I've just checked the CSS file and found out that the min-width is done through padding on body, *not* through an expression. But I was checking for a min-width behavior, no wonder it worked fine without JS... Duh! It's the statement on PIE While this is a script, the user cannot disable this type of CSS expression when disabling JavaScript. that put my brain in a Jello state ;) Thanks for trying so hard to convince me, now I'm *sure* it doesn't work... No problem, Thierry ;-) But there is an expression at play there - not the best implementation - but if you disable script in IE, you will see the content wrapper get considerably wider. -- Al ** 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] Set min-width using DOM
I first discovered these expressions quite some time ago. Sorry if I'm stealing anyone's thunder. http://www.svendtofte.com/code/max_width_in_ie/ Regards, Stuart ** 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] Set min-width using DOM
Ok, so my final questions is... is there a fallback for expression() ? Something in IE for expression that functions like noscript for script? What I am thinking of is that if someone using IE doesn't have expression(), you may want to give them a fixed width layout as backup. Something like: expression( max-width stuff) else ( width: 740px; ) or: width:740px; expression( fluid and max-width stuff ) Any ideas? -- C Montoya rdpdesign.com ... liquid.rdpdesign.com ... montoya.rdpdesign.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] Set min-width using DOM
It seems to work from IE 5.x up. Not in the Mac version but what does? ;) I've just added the line to the page container style in my primary stylesheet. Works like a treat and doesn't appear to affect Mozilla/Firefox. Haven't checked other browsers but am eager for feedback. -Original Message- From: Christian Montoya OK, now you have me very excited. Does this go in external stylesheets? How's the support for IE browsers? Other browsers? Tell me more. ** 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] Set min-width using DOM
The min-width was set using CSS expressions which only works in IE. It actually is javascript that makes it work, but it goes in the CSS (inline or external stylesheet). It won't work if javascript is off. It can work for min width or max width. Other browsers (mozilla based) don't recognize this, but do recognize min-width and max-width. Hopefully this is somewhat useful (it's my first post). Ian OK, now you have me very excited. Does this go in external stylesheets? How's the support for IE browsers? Other browsers? Tell me more. ** 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] Set min-width using DOM
Christian Montoya wrote: OK, now you have me very excited. Does this go in external stylesheets? How's the support for IE browsers? Other browsers? Tell me more. G'day Christian, The expression code that Paul used (and which I often use myself) is proprietary to Microsoft. IE allows some Javascript within CSS files. It is however invalid according to W3C standards. When using code like that, I add it in a separate IEhacks.css file via conditional comments (or I'd like to!). But, then, we all do that, right? Cheers Lachlan ** 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] Set min-width using DOM
So we're very close here then? Would something like this be appropriate and still validate? !--[if IE] style type=text/css@import IE-override.css;/style ![endif]-- -Original Message- From: Lachlan Hardy G'day Christian, The expression code that Paul used (and which I often use myself) is proprietary to Microsoft. IE allows some Javascript within CSS files. It is however invalid according to W3C standards. When using code like that, I add it in a separate IEhacks.css file via conditional comments (or I'd like to!). But, then, we all do that, right? Cheers Lachlan ** 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] Set min-width using DOM
Ian Rifkin wrote: The min-width was set using CSS expressions which only works in IE. It actually is javascript that makes it work, but it goes in the CSS (inline or external stylesheet). It won't work if javascript is off. I'm not sure about that. I believe it still works with script disabled. 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 **