Re: [WSG] Styling Fieldset and Legend Elements
Thierry Koblentz: the * html hack works in IE *Mac* too. good point. There's always the tan hack, but probably the better way to go is to exploit IE/Macs lack of @media support. @media screen { * html... } Patrick H. Lauke: I have an aversion for adding cruft that only works in a specific browser family to my HTML, which should be browser agnostic. Ditto. I've been agreeing with Patrick a lot lately... I'm not a stalker, I promise. 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: star hack and IE 7 (was Re: [WSG] Styling Fieldset and Legend Elements)
Gunlaug Sørtun: Nothing wrong with 'conditional comments' I always weigh it up with the cost of CC code size plus the server trip for the file, vs. the code size for inline '* html hacks', usually the latter method wins. 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] Styling Fieldset and Legend Elements
Thierry Koblentz wrote: I think it worth mentioning that the * html hack works in IE *Mac* too. I forgot about this earlier, but that's the reason for the comment hack to hide from IE5/Mac. /*\*/ * html { ... } /**/ -- Lachlan Hunt http://lachy.id.au/ ** 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] Styling Fieldset and Legend Elements
Lachlan, The attached pic is a screen shoot from IE 6. Firefox 1.5 was fine...CheersAlOn 3/7/06, Lachlan Hunt [EMAIL PROTECTED] wrote:Philippe Wittenbergh wrote: http://lachy.id.au/dev/2006/03/fieldset On OS X 10.4.5 Firefox 1.5, Camino - latest nightly trunk build, iCab 3.0, Safari 2.03 and WebKit nightly build, Opera 9 tp2,all look the same. and so does Konqueror/KDE 3.5 running on top of OS X .Great!But I still need a solution to fix it in IE6. IE 5.2 Mac has a small 1pxwhite border around the legend, barely visible given your light background-color. There is also some white-space under the legend (padding on fieldset, you won't get rid of it).That's acceptable, IE/Mac is obsolete now anyway, so as long as the pageis readable, I'm not concerned.-- Lachlan Hunthttp://lachy.id.au/**The discussion list forhttp://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help** -- Cheers!Al Kendall Untitled-2.png Description: PNG image
Re: [WSG] Styling Fieldset and Legend Elements
Al Kendall wrote: The attached pic is a screen shoot from IE 6. Firefox 1.5 was fine Yes, I know. I think you misread my e-mail. I knew it was broken in IE6, I'm looking for a way to fix it. Any ideas? -- Lachlan Hunt http://lachy.id.au/ ** 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] Styling Fieldset and Legend Elements
There is another example and a way of do it...It´s in portuguese my native, but if you follow the cod it´s easy, and pretty-- http://www.artideias.com
Re: [WSG] Styling Fieldset and Legend Elements
Lachlan Hunt wrote: The following test case demonstrates how I want it to look and my current solution that works in Firefox. Both examples in the page should look roughly identical http://lachy.id.au/dev/2006/03/fieldset Don't know, but the following addition makes it look pretty ok in my IE6... * html legend {margin: 0 -6px; display: block;} Georg -- http://www.gunlaug.no ** 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] Styling Fieldset and Legend Elements
I would advise against * html hacks though - http://www.webstandards.org/buzz/archive/2005_12.html#a000598Daz On 07/03/06, Gunlaug Sørtun [EMAIL PROTECTED] wrote: Lachlan Hunt wrote: The following test case demonstrates how I want it to look and my current solution that works in Firefox.Both examples in the page should look roughly identical http://lachy.id.au/dev/2006/03/fieldsetDon't know, but the following addition makes it look pretty ok in my IE6...* html legend {margin: 0 -6px; display: block;} Georg--http://www.gunlaug.no**The discussion list forhttp://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help**
Re: [WSG] Styling Fieldset and Legend Elements
On 07/03/06, Darren West [EMAIL PROTECTED] wrote: I would advise against * html hacks though - http://www.webstandards.org/buzz/archive/2005_12.html#a000598 Daz On 07/03/06, Gunlaug Sørtun [EMAIL PROTECTED] wrote: Don't know, but the following addition makes it look pretty ok in my IE6...* html legend {margin: 0 -6px; display: block;} Put it in a conditional comment instead. Then you can even target IE6 specifically, and everyone's happy. :) Seona.
Re: [WSG] Styling Fieldset and Legend Elements
Seona Bellamy wrote: On 07/03/06, Darren West [EMAIL PROTECTED] wrote: I would advise against * html hacks though - http://www.webstandards.org/buzz/archive/2005_12.html#a000598 I tend to disagree with such nonsense. * html is a completely safe filter to use now that we know IE7 will not be supporting it in standards mode. Therefore, for any IE6-and-earlier only hack, it is perfectly safe to use it. IE 7 will then receive the same styles as all other browsers. If it turns out that the limitation is still present in IE7, the filter will need to be modified to target IE7 as well, but until we know for certain whether it is or not, we cannot safely target IE7. Put it in a conditional comment instead. Then you can even target IE6 specifically, and everyone's happy. :) I have already used a conditional comment in this particular site because few hacks I had used were still required in IE7b2, but that was before I realised that IE7b2 was nothing more than a joke and I probably shouldn't have bothered with it. -- Lachlan Hunt http://lachy.id.au/ ** 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] Styling Fieldset and Legend Elements
At 02:29 PM 3/7/2006, Lachlan Hunt wrote: Seona Bellamy wrote: On 07/03/06, Darren West [EMAIL PROTECTED] wrote: I would advise against * html hacks though - http://www.webstandards.org/buzz/archive/2005_12.html#a000598 I tend to disagree with such nonsense. With all due respect, Lachlan, your dismissive tone is inappropriate for a group of peers working together toward a common goal. Seona said nothing to warrant your unfriendliness, even if you disagree with her point intellectually. As for your intellectual point, surely you know that the reason that * html is a hack is that it assumes that the presence of one weakness of a browser indicates the presence of another totally unrelated weakness. These coincidental clusters of bugs vary from one version of a browser to the next which is why so many hacks are version-dependent. Like browser-sniffing, relying on them makes for fragile code. You can get away with using them for the time being, but where's the long view? When one weakness in a browser is eventually fixed but not another, the hack will break. Each time a browser vendor comes out with a new version, those of us who've used these hacks will either have to scurry around patching our hacky code or leave our old pages broken and bleeding in the ditches of the internet. Your own language indicates how convoluted this is: * html is a completely safe filter to use now that we know IE7 will not be supporting it in standards mode. Therefore, for any IE6-and-earlier only hack, it is perfectly safe to use it. IE 7 will then receive the same styles as all other browsers. If it turns out that the limitation is still present in IE7, the filter will need to be modified to target IE7 as well, but until we know for certain whether it is or not, we cannot safely target IE7. Yah, yah, yah. Why should our code depend on combinations of bugs occurring in the same version when we can simply filter for version numbers and leave it at that? Using conditional comments to work around IE's bugs is coding for the future. (Now all I need to do is follow my own advice...) Regards, Paul ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
star hack and IE 7 (was Re: [WSG] Styling Fieldset and Legend Elements)
Darren West wrote: I would advise against * html hacks though - http://www.webstandards.org/buzz/archive/2005_12.html#a000598 The * html hack will not pose a problem as long as IE 7 fixes its other bugs and inconsistencies (it will just ignore the * html like other good browsers, and - provided all the bugs that cause developers to use * html in the first place are addressed - will behave like any other modern browser). IMHO anyway. -- Patrick H. Lauke __ re·dux (adj.): brought back; returned. used postpositively [latin : re-, re- + dux, leader; see duke.] www.splintered.co.uk | www.photographia.co.uk http://redux.deviantart.com __ Web Standards Project (WaSP) Accessibility Task Force http://webstandards.org/ __ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
star hack and IE 7 (was Re: [WSG] Styling Fieldset and Legend Elements)
Paul Novitski wrote: These coincidental clusters of bugs vary from one version of a browser to the next which is why so many hacks are version-dependent. Like browser-sniffing, relying on them makes for fragile code. You can get away with using them for the time being, but where's the long view? No '* html' related problems in IE7 and later versions, since they won't recognize it. Quoting from... http://www.webstandards.org/buzz/archive/2005_12.html#a000598 -- Wilson points out that the goal is to fix IE, and getting there is a process. “I want to remove the * html hack to make it useful . . . because it will then only apply to obsolete browsers.” -- Looks like the '* html' hack will only get through to obsolete IE versions - IE6 and older, which to me makes it an extremely safe hack to use now and in the future. The fact that '* html' is valid nonsense makes it even better - IMO. ... Why should our code depend on combinations of bugs occurring in the same version when we can simply filter for version numbers and leave it at that? Using conditional comments to work around IE's bugs is coding for the future. Nothing wrong with 'conditional comments' - apart from the fact that we can't get what's inside them through to the validator(s) (unless we deliver it separately). I tend to think of 'conditional comments' as 'MSIE garbage-cans', and as such they may be very useful at times. The humble '* html' hack may even be used inside a *single* 'conditional commented stylesheet', which makes it even more useful since we can keep the different IE/win versions separate as part of a 'disgraceful degradation' strategy - and keep it all well away from the CSS validator while we're at it. Should work pretty well as long as IE accept 'conditional comments', and I think that comment-hack will last for a very long time. ...but then again - who knows anything substantial about the future... regards Georg -- http://www.gunlaug.no ** 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] Styling Fieldset and Legend Elements
I would advise against * html hacks though - http://www.webstandards.org/buzz/archive/2005_12.html#a000598 Personally I think building/testing/making long-term strategy for a beta-version browser is not advisable. We will not know what IE7 can and can't do until it is actually released. Until then we are all just wasting our time speculating and arguing. The next beta could break things that work in the current beta. I certainly don't understand why so many people have been so willing to accept Microsoft's decree - stop using that simple hack which can be removed from your CSS anytime you like; bloat your content with our proprietary hack, you miserable ingrates!. Conditional comments are a hack - an ugly, inefficient hack at that. Planning for the future includes the thought hey, when IE6 becomes irrelevant, I'm going to have to edit every single HTML document I've got to remove this bloat!. Remember, not every site uses a CMS (and not every CMS has a decent template system). Or alternatively, some browser will come out which has a bug that makes it read the stylesheet that was only intended for IE6; only to render a complete mess as it tries to cope with conflicting CSS. We do know that the * html hack works right now and it's entirely plausible that it will work just fine when IE7 comes out. It's entirely plausible that some future browser will have a problem with * html but it's also likely that IE6 will be a footnote by then so the hacks can be removed. The sky is not falling! /soapbox ;) Ben -- --- http://www.200ok.com.au/ --- The future has arrived; it's just not --- evenly distributed. - William Gibson ** 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] Styling Fieldset and Legend Elements
Paul Novitski wrote: Using conditional comments to work around IE's bugs is coding for the future. Personally, I have an aversion for adding cruft that only works in a specific browser family to my HTML, which should be browser agnostic. Sure, it validates, but it's just proprietary browser code disguised as a comment. As always, the above is the purist in me speaking. The pragmatist on the other hand will use it when necessary... -- Patrick H. Lauke __ re·dux (adj.): brought back; returned. used postpositively [latin : re-, re- + dux, leader; see duke.] www.splintered.co.uk | www.photographia.co.uk http://redux.deviantart.com __ Web Standards Project (WaSP) Accessibility Task Force http://webstandards.org/ __ ** 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] Styling Fieldset and Legend Elements
At 05:02 PM 3/7/2006, Ben Buchanan wrote: Conditional comments are a hack - an ugly, inefficient hack at that. Planning for the future includes the thought hey, when IE6 becomes irrelevant, I'm going to have to edit every single HTML document I've got to remove this bloat!. My point was simply that IE's conditional comments -- and ugly they are, no argument there -- are more likely to work as intended in a few years than hacks like * html. Or alternatively, some browser will come out which has a bug that makes it read the stylesheet that was only intended for IE6; only to render a complete mess as it tries to cope with conflicting CSS. Exactly. I believe this is much more likely to occur with * html type hacks than conditional comments. We do know that the * html hack works right now and it's entirely plausible that it will work just fine when IE7 comes out. It's entirely plausible that some future browser will have a problem with * html but it's also likely that IE6 will be a footnote by then so the hacks can be removed. I don't think hacks will be removed from most pages. The amount of legacy crap on the web is phenomenal. Who bothers to clean up a three-year-old archive? That's the thinking that points me toward using hacks that will persist. Just to give myself a little perspective, I should confess that I do use the * html hack in my own stylesheets -- in fact it's pretty much the only one I do use. My previous outburst was motivated more by a desire to throw a bucket of water on someone's haughtiness than it was to start another holy war. Regards, Paul ** 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] Styling Fieldset and Legend Elements
Paul Novitski wrote: My point was simply that IE's conditional comments -- and ugly they are, no argument there -- are more likely to work as intended in a few years than hacks like * html. * html hacks will continue to work in IE6 forever, just as they do today. We already know this filter has been fixed in IE7 (standards mode), and so the following are exactly equivalent: !--[if lte IE 6] ... ![end if]-- * html foo { ... } (In the case of IE7 quirks mode, * html will still apply whereas the conditional comment would not. In fact, since IE7 quirks mode will be very close to IE6 quirks mode, * html would be better because it would be very likely that the patch will still be required.) So, any argument that stating that conditional comments are more future proof is a myth. In fact, if you're not careful with conditional comments, they can be more dangerous. Consider the following: * html #content { height: 1%; } !--[if IE]style#content { height: 1%; }/style![end if]-- The * html hack will only apply to IE 6 and earlier. That particular conditional comment will apply to all versions of IE since IE5 (when conditional comments were first added). If IE7 fixes the limitation from IE6, I'm sure you would agree that the patch should not apply to IE7 and, therefore, the use of a filter which does not apply to IE7 is the better option. The most effective future proofing method we have is to ensure that any hacks we do use today do not inadvertently target any future browser. It is better for future browsers to receive fully standards compliant CSS, then for them to apply patches intended for and only tested in current browsers. If the fate of * html was not yet known then I would agree that conditional comments with a version number specified are safer, but since we do know that * html is equivalent to [if lte IE 6], both are completely safe. -- Lachlan Hunt http://lachy.id.au/ ** 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] Styling Fieldset and Legend Elements
Lachlan Hunt wrote: * html hacks will continue to work in IE6 forever, just as they do today. We already know this filter has been fixed in IE7 (standards mode), and so the following are exactly equivalent: !--[if lte IE 6] ... ![end if]-- * html foo { ... } I think it worth mentioning that the * html hack works in IE *Mac* too. 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] Styling Fieldset and Legend Elements
Thierry Koblentz wrote: I think it worth mentioning that the * html hack works in IE *Mac* too. What about conditional comments? I don't think that really matters much anyway, since IE Mac is officially obsolete (i.e. now completely unsupported by Microsoft) and I think some unwanted hacks applying to it would be the least of its problems. -- Lachlan Hunt http://lachy.id.au/ ** 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] Styling Fieldset and Legend Elements
On Mar 8, 2006, at 2:48 PM, Lachlan Hunt wrote: Thierry Koblentz wrote: I think it worth mentioning that the * html hack works in IE *Mac* too. What about conditional comments? I don't think that really matters much anyway, since IE Mac is officially obsolete (i.e. now completely unsupported by Microsoft) and ... It might be unsupported by MS, but it is still quite well used, in the **real** world. That said, no, IE Mac doesn't support CC. I think some unwanted hacks applying to it would be the least of its problems. Let it see some of the hacks targeted at IE Win can end in a complete disaster (i.e. inaccessible content). The often used 'Holly Hack' (height:1%) causes big problems in IE Mac. That browser incorrectly computes % height as '0' instead of 'auto' as it should per CSS 2.1 (for in-flow elements when no parent element has a height specified). 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] Styling Fieldset and Legend Elements
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lachlan Hunt Sent: Tuesday, 7 March 2006 4:12 PM To: wsg@webstandardsgroup.org Subject: [WSG] Styling Fieldset and Legend Elements Hi, I'm looking for a way to style a legend element with a background that spans the whole width of the page. I originally used a regular heading (h3) because I knew the design would have difficulty with fieldset/legend, but the after the accessibility review it was requested that we use fieldset/legend anyway and I need to get the design as close as possible. I never managed to get legends to look anywhere close to what I wanted them to in all browsers. They are just being interpreted so differently, I ended up working around it: I am now using a div and a legend both containing the same content. Something like this: div class=fieldsetTitleYour Details/div fieldset legendYour Details/legend /fieldset In the css I hide the legend from the general public and format the .fieldsetTitle the way I want it. I know this is a nasty way of doing it and I end up doubling information, but that's the only way I ever found. Legends just cannot be formatted properly. ** 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] Styling Fieldset and Legend Elements
On Mar 7, 2006, at 2:12 PM, Lachlan Hunt wrote: I'm looking for a way to style a legend element with a background that spans the whole width of the page. I originally used a regular heading (h3) because I knew the design would have difficulty with fieldset/legend, but the after the accessibility review it was requested that we use fieldset/legend anyway and I need to get the design as close as possible. By default, legends are only as wide as they need to be to fit the text and there seems to be little one can do about this in current browsers. I came up with one solution using a thick top border on the fieldset behind the legend element which works in Firefox, but it doesn't quite work in IE because it leaves a small white gap between the legend and fieldset border. I currently don't have access to any other browsers for testing, but I'd like it to work fairly well in at least all major browsers. The following test case demonstrates how I want it to look and my current solution that works in Firefox. Both examples in the page should look roughly identical http://lachy.id.au/dev/2006/03/fieldset On OS X 10.4.5 Firefox 1.5, Camino - latest nightly trunk build, iCab 3.0, Safari 2.03 and WebKit nightly build, Opera 9 tp2, all look the same. and so does Konqueror/KDE 3.5 running on top of OS X . IE 5.2 Mac has a small 1px white border around the legend, barely visible given your light background-color. There is also some white- space under the legend (padding on fieldset, you won't get rid of it). 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] Styling Fieldset and Legend Elements
Philippe Wittenbergh wrote: http://lachy.id.au/dev/2006/03/fieldset On OS X 10.4.5 Firefox 1.5, Camino - latest nightly trunk build, iCab 3.0, Safari 2.03 and WebKit nightly build, Opera 9 tp2, all look the same. and so does Konqueror/KDE 3.5 running on top of OS X . Great! But I still need a solution to fix it in IE6. IE 5.2 Mac has a small 1px white border around the legend, barely visible given your light background-color. There is also some white-space under the legend (padding on fieldset, you won't get rid of it). That's acceptable, IE/Mac is obsolete now anyway, so as long as the page is readable, I'm not concerned. -- Lachlan Hunt http://lachy.id.au/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **