Felix
Felix

Reputation: 5629

TYPO3 special CSS file for IE

Is there a best practice to add specific css for Internet explorer in TYPO3?

I tried this in template:

<!--[if IE]>
    <link href="fileadmin/config/script/css/ieCSS.css" rel="stylesheet" type="text/css" >
<![endif]-->

but It has no effect ...

thanks

Upvotes: 0

Views: 594

Answers (2)

Riccardo De Contardi
Riccardo De Contardi

Reputation: 2148

From official documentation: https://docs.typo3.org/typo3cms/TyposcriptReference/6.2/Setup/Page/Index.html#includecss-array

page.includeCSS{
  ieStyle = fileadmin/config/script/css/ieCSS.css
  ieStyle.allWrap = <!--[if IE]>|<![endif]-->  
  ieStyle.excludeFromConcatenation=1
}

What version of Internet Explorer are you using?

Upvotes: 1

Bernd Wilke πφ
Bernd Wilke πφ

Reputation: 10800

your template normaly only gives content to include in body-tag.
The css-declarations and also your IE-Conditions must be in the header-tag.

so a solution would be to use the possibility to declare your own header data:

page {
    headerData {
        10 = TEXT
        10 (
            <!--[if IE]>
            <link href="fileadmin/config/script/css/ieCSS.css" rel="stylesheet" type="text/css" >
            <![endif]-->
        )
    }
}

Upvotes: 1

Related Questions