How to include a custom CSS file in TYPO3
10,731
You have to give each css file you want to include a unique key (e.g. myCssFile1
). Also use a colon after the EXT:
. So the correct way of including a CSS file with TypoScript would be
page.includeCSS.myCssFile1 = EXT:my_ext/Path/to/css_file.css
Author by
Aswathy S
I am a PHP developer.I like Programming.I'm interested in API integration.
Updated on June 27, 2022Comments
-
Aswathy S almost 2 years
I need to build an Extension in typo3 7.6.I include a css file in setup.txt using
page.IncludeCSS = Ext.Path_to_css_file.css
But the styles in my css file is override by some other custom styles.How can I prevent this.Any Idea? I am new to typo3.Please help me.Thank you in advance.
-
Anu Bhuvanendran Nair almost 8 yearsCheck your TS template include section.Please try to include your extension at the very last.
-
Aswathy S almost 8 years@AnuBhuvanendranNair my extension template is included very last.But it is not working
-
-
Daniel almost 8 yearsthe
includeCSS
have to be with a lower case i. I updated the answer -
Daniel almost 8 yearsMake sure your extension is installed, the path is correct and your identifier is unique. Then this works 100%.
-
sven almost 8 yearsPlease give us the order of your static template includes and also the generated head html with the css includes. Third, tell us what css selector is overriding what other selector.
-
Welsh King about 6 yearswhich file in the extension do you add this ?