[Typo3-dev] templavoila + conditional comments

Chi Hoang hoang at planb-media.de
Wed Nov 3 17:50:25 CET 2004


Hi Christoph,

I know about this hack, but its good to read it again. But for some 
reason I need the quirksmode, but I will try it nevertheless.

Too bad, that Templavoila isnt support conditional comments at the 
moment. This would be a great help to me (or not, because of Mac).

Maybe it is a good addon for further Templavoila? What do you think?

But what about Tan-Hack an IE Mac? Does it work on Mac? Elsewhere I must 
  handcoded my head data... Not very satisfactory this browser mess.


Greets,

Chi


P.S.: A nice site I found: www.quirksmode.org




Christopher wrote:

> --- Chi Hoang <hoang at planb-media.de> wrote:
> 
> 
>>Christopher wrote:
>>
>>>My first question would be 'what are you trying to achieve?' I rely
>>>very heavily on css in my pages but I've never needed to use the IE
>>>conditional comments. If you let me know what effect you want, I
>>
>>may be
>>
>>>able to suggest another option...
>>
>>I have trouble with the Boxmodel of IE and Netscape/Mozilla/Firefox
>>in 
>>Quirksmode! Do you have any hints?
>>
>>Greets,
>>
>>Chi
> 
> 
> Well, you're right, the IE conditionals *are* useful for that. But you
> can exploit the so-called 'tan-hack' ([1], [2]) and it's variants for
> IE-only styles. 
> 
> Here's the variant that I like to use:
> 
> 
> /* The overall width of this object will be 140px */
> .width-demo /* for standards-compliant browsers */
> { 
>   width:100px; /* Content area = 100px */
>   padding:0 10px; /* ...plus 10px padding on each side */
>   margin:0 10px;  /* ...plus 10px margin on each side */
> }
> 
> * html .width-demo  /* this selector recognized by IE only */
> {
>   \width:140px;   /* total width (only for IE5.x/Win) */
>   w\idth:100px;  /* content width (for other IE [i.e. IE6]) */
> } 
> 
> 
> ...It looks a bit messy, but it's mostly 'cause of all the comments I
> put in it. It's important, if you're going to try to correct the broken
> box to make *sure* you're in standards mode (e.g. use the full doctype
> and do not use the xml prologue which will send IE into quirks mode
> again regardless of doctype...)
> 
> By the way, as a last-resort solution, you can use
> 'page.disableAllHeaderCode' in your template - though you will have to
> build the whole header as a cObject [3].
> 
> -Christopher
> 
> 
> [1] http://www.google.com/search?hl=en&lr=&q=%22tan+hack%22
> 
> [2]
> http://www.google.com/search?q=site%3Awebmasterworld.com+%2B+%22tan+hack%22
> 
> [3] http://typo3.org/documentation/document-library/doc_core_tsref/quot_CONFIG_quot/





More information about the TYPO3-dev mailing list