DokuWiki

It's better when it's simple

User Tools

Site Tools


faq:css

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
faq:css [2010-02-22 19:31] 74.93.99.97faq:css [2023-09-20 21:00] (current) – this is bullshit and not a proper FAQ andi
Line 1: Line 1:
-====== CSS ====== 
- 
-===== So, how can I customize my template's CSS? ===== 
-When you write or customize a template, you should not need to add the <link> tag within your page's header. To add your own CSS to the page, you should look at the ''style.ini'' file within your template dir. 
- 
-Usually, you should add a line like ''myVeryOwn.css = screen'' in the ''[stylesheets]'' section of the ''style.ini'' file. 
- 
-===== Why do this? I could just add a tag in my HTML template, no? ===== 
-Yes, you can. However, depending on where and how you put this line you may end up with problems. When you add your CSS through the ini file, [[:Dokuwiki]] will take it and resolve for you the paths within your CSS, so you don't have to add manually the full paths in your CSS. Example, if you want to add a ''logo.gif'' that's in the template dir, just write ''url(logo.gif)'' and don't bother with another path.  
- 
-Other benefits of that method are that CSS is compressed in order to make the loading of the page faster and you can also benefit from the [[devel:css#Pattern Replacement]] feature. 
- 
-===== It tried but it doesn't work? ===== 
-  * The most common mistake is that you forgot to put ''<?php tpl_metaheaders(); ?>'' in the ''<header>'' section of your page. 
- 
  
faq/css.1266863473.txt.gz · Last modified: 2010-02-22 19:31 by 74.93.99.97

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki