CSS

CSS snippets let you apply custom styles to your Joomla site without editing template files directly. They are ideal for any visual customisation that doesn't require loading an external file — things like tweaking fonts and colours, adjusting spacing, hiding or showing specific elements, fixing layout issues introduced by a template or third-party extension, or adding responsive design adjustments for mobile devices.

How to Create a CSS Snippet

To learn how to add custom CSS in Joomla, follow the steps below:

  1. Log in to your Joomla administrator
  2. Go to Components → Tassos Code Snippets
  3. Click New
  4. Enter a descriptive Title (e.g. "Custom Button Styles")
  5. Select CSS as the Code Type.
  6. Choose one of the following insertion locations
    • Site Header
    • Admin Footer
  7. Write or paste your CSS into the editor. Do not include <style> tags — write pure CSS only. Your CSS is automatically wrapped in a <style> tag and injected at the chosen location.
  8. Open the Conditional Logic tab to restrict which pages or users the snippet runs on. Leave it empty to run it site-wide. Learn more in Using Snippet Logic.
  9. Set Status to Published and click Save & Close.

Troubleshooting

Styles Not Applying

  1. Check specificity: Your CSS might be overridden by template styles — use browser DevTools to inspect the element and increase selector specificity or use !important as a last resort
  2. Verify snippet is published: Check status is set to Published
  3. Clear cache: Clear both Joomla cache and browser cache
  4. Check location: Ensure snippet is in Header location

Styles Causing Layout Issues

  • Validate your CSS syntax
  • Check for missing semicolons or curly braces
  • Test on different browsers and devices
  • Use browser DevTools to debug

Mobile Styles Not Working

  • Ensure viewport meta tag is present: <meta name="viewport" content="width=device-width, initial-scale=1">
  • Test media query breakpoints
  • Check for conflicting template styles
Last updated on Mar 3rd 2026 14:03