0
Welcome Guest! Login
0 items Join Now

SOLVED Add a custom css file to a template override

  • SOLVED Add a custom css file to a template override

    Posted 11 years 3 months ago
    • Hi,

      I am creating a template with Gantry and have added a few template overrides. I now want to add custom css files to those overrides. How do I name those, can't find anything in the documentation.

      Regards
      Dick
    • cdavis411's Avatar
    • cdavis411
    • Preeminent Rocketeer
    • Posts: 17787
    • Thanks: 882

    Re: SOLVED Add a custom css file to a template override

    Posted 11 years 3 months ago
    • If you are using Gantry 4 (or later) you can create a file named in this format TEMPLATENAME-custom.css file.

      (e.g., gantry-custom.css)
      for a club template like Cerulean
      (e.g., rt_cerulean-custom.css)
  • Re: SOLVED Add a custom css file to a template override

    Posted 11 years 3 months ago
    • Hi cdavis411,

      I'm already using the gantry-custom.css for the default template. I now want to add another one to change it for the override.
      I'm using the basic gantry template, i.e. called MOS, this uses the gantry-custom.css. Adding an override, i.e. MOS-name, using MOS-name-custom.css doesn't work.
      Do I have to add seperate templates for these instead of overrides?
    • cdavis411's Avatar
    • cdavis411
    • Preeminent Rocketeer
    • Posts: 17787
    • Thanks: 882

    Re: SOLVED Add a custom css file to a template override

    Posted 11 years 3 months ago
    • if the template name is mos then the custom css file should be mos-custom.css
  • Re: SOLVED Add a custom css file to a template override

    Posted 11 years 3 months ago
    • I know, but I'm already using that. In the template I want to change the color of the whole template per menu item.
      So I need a whole set of custom templates linked to the overrides. i.e. mos-1, mos-2, mos-3 etc.
    • Dan221's Avatar
    • Dan221
    • Jr. Rocketeer
    • Posts: 31
    • Thanks: 1

    Re: SOLVED Add a custom css file to a template override

    Posted 11 years 1 month ago
    • You do not need no make an template override for this. You can add a pagesuffix to the menu-item; that creates an css class on the top.
      So if your suffix in the menu is mos1 you can style it in the regular "mos-custom.css - File" with .mos1
    • cdavis411's Avatar
    • cdavis411
    • Preeminent Rocketeer
    • Posts: 17787
    • Thanks: 882

    Re: SOLVED Add a custom css file to a template override

    Posted 11 years 1 month ago
    • you can just enable the page suffix toggle in the advanced tab. then it will create class added to the body tag based ont he menu item's alias.
      E.g, for the Home menu item if the alias is home the class menu-home is added to the body tag.

      so a css rule could look like
      .menu-home element .class {property: value;}
    • SeoChad's Avatar
    • SeoChad
    • Newbie
    • Posts: 3
    • Thanks: 0

    Re: SOLVED Add a custom css file to a template override

    Posted 10 years 8 months ago
    • Where do I place css file I want to remove text from banner

      .rg-ss-info {position: absolute;top: 50%;margin-top: -75px;left: 10%;z-index: 5;width: 50%;}
      .rg-ss-title {display: none;padding: 10px 15px;font-size: 300%;line-height: 100%;-webkit-transform: translateZ(0); -webkit-font-smoothing: subpixel-antialiased;}
      .rg-ss-caption {display: none;}
    • SeoChad's Avatar
    • SeoChad
    • Newbie
    • Posts: 3
    • Thanks: 0

    Re: SOLVED Add a custom css file to a template override

    Posted 10 years 8 months ago
    • I'm on a Deadline any help will be much appreciated thank you so much!
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: SOLVED Add a custom css file to a template override

    Posted 10 years 8 months ago

Time to create page: 0.073 seconds