1

So, I have worked up a html menu with a css3 hexagon grid that I'm adding to a page with a custom html module. Can I add a separate style sheet for this module? If so, how?

2 Answers 2

1

I agree with @Mikan although if you really want to add a separate stylesheet there are at least a couple of ways to do this:

  1. add some code to your custom HTML module as per https://stackoverflow.com/a/20607027/1983389 using the free or paid version of Sourcerer or similar.

  2. use a third party extension like the free or paid version of EasyScript or similar

1
  • 1
    thanks @neil, I accepted this answer because it contained a solution, even though it's better not to.
    – nizz0k
    Commented Oct 28, 2016 at 8:57
2

You don't have to add separate CSS file. You can just style-up new selectors you want, or use some existing in main template.css or custom.css, whichever you are using, and reference them in Custom HTML module.

That also goes along the line of general guidelines of using as small naumber of external CSS/JS files as possible, in order to reduce number of HTTP requests.

4
  • appreciated @mikan
    – nizz0k
    Commented Oct 28, 2016 at 8:55
  • You're quite welcome :)
    – Mikan
    Commented Oct 28, 2016 at 9:12
  • You dont need to reference the custom.css file. If it has any styling in it, it's automatically loaded ;)
    – Lodder
    Commented Oct 28, 2016 at 10:48
  • That is true of course. By "reference them" I wanted to say "in custom html module use selectors defined in template.css or custom.css, because that styling is automatically loaded". Sorry for my bad English.
    – Mikan
    Commented Oct 28, 2016 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.