0
Welcome Guest! Login
0 items Join Now

Modifier les dossiers CSS

  • Modifier les dossiers CSS

    Posted 13 years 6 months ago
    • Hello I have three questions: How to manage the order of "css" between modifictaion color within the parameters of style in joomla template, the gantry.css, template.css and style1.css! Sometimes we do not know which file must be changed!
      How to add "class css" module?
      How to add typography?
      I thank you very much in joomla 1.7, gantry latest versions!
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: Modifier les dossiers CSS

    Posted 13 years 6 months ago
    • 1. in 99% of all cases it's the best not to change the css.
      (And just to say that: You sholud never change one of the core files in the the gantry-folder)
      It's better to add something to a new css-file and use css-specificty to override the css from template or gantry.

      Just to give an example:
      I always think h2 is spaced too narrow in gantry.
      A quick look with Firebug unveils that line 57 in gantry.css is responsible for that.

      h2.title {
      font-size: 170%;
      letter-spacing: -1px;
      line-height: 1em;
      }

      Now we can add a css-rule with a higher specificity to override that.
      coding.smashingmagazine.com/2007/07/27/c...ngs-you-should-know/

      like

      div.module-title h2.title { letter-spacing: normal; }

      But where to add that?
      One way would be to just add it at the end of template.css. But in fact it doesn't matter just as long as this line is in a loaded css-file.

      The best way is to add your own css-file.
      Why that?
      Because most template upgrades deal with css-issues. Means you have to replace the files with new ones. You would easily loose your changes.

      So how to add your own css-file?
      Open the index.php of your template and find a line like
      $gantry->addStyles(array('template.css','joomla.css','typography.css'));
      Change it like this
      $gantry->addStyles(array('custom.css','template.css','joomla.css','typography.css'));
      and create a css-file 'custom.css' in css folder of your template.

      In this file add your new rule
      div.module-title h2.title { letter-spacing: normal; }

      Clear your cache and the spacing of h2-titles in modules should be corrected.

      2. How to add a mod-suffix:
      Module Variations allow you to individually style a module Enter any available suffixes at Extensions → Module Manager → Module → Module Class Suffix

      3. How to add typography?
      Disable your wysiwg-editor or use Rokpad instead.
      Please keep in mind that in J1.7 you have to set filtering in article-manager→articles-options to no filtering.

Time to create page: 0.057 seconds