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?

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
    thanks @neil, I accepted this answer because it contained a solution, even though it's better not to. – nizz0k Oct 28 '16 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.

  • appreciated @mikan – nizz0k Oct 28 '16 at 8:55
  • You're quite welcome :) – Mikan Oct 28 '16 at 9:12
  • You dont need to reference the custom.css file. If it has any styling in it, it's automatically loaded ;) – Lodder Oct 28 '16 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 Oct 28 '16 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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