[All Adaptavist Apps]

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
What syntax should I use?
What syntax should I use?

When you import a CSS file the syntax is generally in the form:

Code Block
@import url(http://www.adaptavist.com/download/attachments/7286/bar.css);

(lightbulb) (warning) You should never put quotes around the URL to the CSS file as this will cause problems with some browsers!

Some browsers will block the imported CSS file if it comes from a different domain to your wiki. For example, if your wiki was on www.foo.com and your CSS was on www.bar.com then depending on the browser settings it might not get imported.

To work round that issue, it's always best to store the CSS file on the same domain as your wiki, for example you can attach the .css file to a page in your wiki. For more information see Creating CSS Files.

If your wiki can be accessed from multiple domain names and the CSS file is stored in the wiki, you should use a relative URL, for example:

Code Block
@import url(/download/attachments/7286/bar.css);

...