Box Model Hack
Called the "box model hack" because the bug it is most often used to work around is the Internet Explorer box model bug, this hack provides a different set of properties to Internet Explorer and other browsers. As of version 6, IE has corrected the box model bug in documents which include certain Document Type Declarations (required by the HTML specifications) in certain ways.
#elem { width: ; voice-family: "\"}\""; voice-family: inherit; width: ; } html>body #elem { width: ; }The first voice-family
statement is set to the string "}"
, but an IE parser bug will interpret it as a string with a single backslash followed by a closing brace for the end of the rule. voice-family
is chosen because it will not affect rendering on a screen style sheet. The second rule uses the html>body
hack for browsers such as Opera 5 that have the parsing bug but do not have the box model bug (and, additionally, which support the child selector).
Read more about this topic: CSS Filter
Famous quotes containing the words box, model and/or hack:
“It all ended with the circuslike whump of a monstrous box on the ear with which I knocked down the traitress who rolled up in a ball where she had collapsed, her eyes glistening at me through her spread fingersall in all quite flattered, I think. Automatically, I searched for something to throw at her, saw the china sugar bowl I had given her for Easter, took the thing under my arm and went out, slamming the door.”
—Vladimir Nabokov (18991977)
“Socrates, who was a perfect model in all great qualities, ... hit on a body and face so ugly and so incongruous with the beauty of his soul, he who was so madly in love with beauty.”
—Michel de Montaigne (15331592)
“I was gonna call it I Love You, Samantha but some old hack got there before me.”
—Blake Edwards (b. 1922)