Re: [css-d] What's this hack for?
/* \*/ * html #tlc, * html #trc {height: 1%;} /* */ It's actually three hacks combined with the ultimate purpose of delivering a minimal height exclusively to IE/Win. /* \*/ = commented backslash hack hides rules from IE/Mac, which doesn't recognize the end of the comment because of a bug parsing the backslash (it seems to treat that second * as an escaped character, hence not recognizing the end of the comment). * html = star-html hack, a selector which only IE (Mac and Win) honors (html has no parent element so other browsers ignore the selector). height: 1% = the Holly Hack, invokes the mysterious hasLayout property on an element to correct a multitude of layout problems in IE, which incorrectly expands a box around its contents (other browsers correctly allow content to overflow, which is why the rule has to be hidden from them). IE/Mac doesn't need the height, but will render the star-html hack, so the rule needs to be specifically hidden from that browser. The closing comment simply ends the commented backslash hack, allowing IE/Mac to resume as normal. Googling the names of any of these common hacks/filters will yield a lot more information on their workings and usage. You can also start here: http://css-discuss.incutio.com/?page=CssHack -- Craig, www.focalcurve.com __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] What's this hack for?
Gavin Jackson wrote: /* \*/ * html #tlc, * html #trc {height: 1%;} /* */ Thanks to all of those that replied to my question about the hacks. I'm amazed at the hoops one must jump through to get something to display the same in all browsers. I can see that this isn't something can be mastered overnight! As a side note, it is possible to replace these hacks with a Conditional Comment. CCs are built-in filters for MSIE/Win5+. http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp Regards, Thierry | www.TJKDesign.com __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
RE: [css-d] What's this hack for?
Hides CSS from IE5 Mac - called commented backslash hack I think. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gavin Jackson Sent: Tuesday, 27 September 2005 1:26 p.m. To: css-d@lists.css-discuss.org Subject: [css-d] What's this hack for? I have a page that I'm pulling apart so I can figure out how it works as I'm new to CSS but would love to master it. The style sheet has the following at the top of the file: /* \*/ * html #tlc, * html #trc {height: 1%;} /* */ I guess it's a hack for something but can't find any help using Google. The page displays a rounded corner area and #tlc and #trc are rules for the top-left-corner and top-right-corner images. Gavin __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/ __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] What's this hack for?
On 27 Sep 2005, at 10:25 am, Gavin Jackson wrote: I have a page that I'm pulling apart so I can figure out how it works as I'm new to CSS but would love to master it. The style sheet has the following at the top of the file: /* \*/ * html #tlc, * html #trc {height: 1%;} /* */ Two hacks in a box :-) line 1: the 'hide from IE mac' filter [1] line 2: the 'holly' hack to give 'haslayout' [2] to IE Win. line 3: end filter for IE Mac [1] http://www.l-c-n.com/IE5tests/hiding/#anhid [2] http://www.satzansatz.de/cssd/onhavinglayout.html Philippe --- Philippe Wittenbergh http://emps.l-c-n.com/ __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/