1

Contao CMS gives the possibility to import .css files (which is the only way to get your css into this weird CMS), but interprets them and re-writes them somewhere into the file structure (or DB ?).

Problem is: It cannot handle modern CSS, and throws everything away that's not basic 2002 style css. Like gradients, media queries etc...

Is there a way to get around this ? Like linking to real .css files ?

Sliq
  • 15,937
  • 27
  • 110
  • 143

3 Answers3

2

Contao 3.2.2 does not need the manual insertion of a <link rel=stylesheet …/>.

  1. Upload the CSS to the contao file tree.
  2. Then proceed via Themes → choose for your theme its icon “Edit the page layouts for theme” → Edit layout → in section “Style sheets” below “Additional style sheets” click on “Change selection” to select the CSS you want from the server file tree.

Contao will then serve your CSS content as part of the CSS it generates (under a somewhat synthetic name) and itself place a <link rel=stylesheet …/> to it in your page.

0

If you have access to FTP or some other way to get files onto the server, just serve your .css file without passing it through the CMS, and put a <link> to that file in the headers. I used to do this with TextPattern because I didn't want to edit my css in the browser.

bookcasey
  • 39,223
  • 13
  • 77
  • 94
0

Write your custom css and place it in the files folder.

You have two choices to link the css to your template

1.Via the theme : Mouse click and select style sheet or paste in code to path <link rel="stylesheet".... in relevant field.

2.Make a custom template : In menu item 'template', create a fe_page.html5 or .xhtml. re-name it something.html5 put your code <link rel="stylesheet".... in the header. Don't forget to add the new template to your theme setup (default template is fe_page..)

How to edit css without ftp : In the menu item 'File manager' browse to the css sheet, press on the blue square icon. you can now edit your style sheet online.

All the above can be made in css3, html5 or whatever your coding pleasure.

ccs
  • 1