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
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:
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.
use a third party extension like the free or paid version of EasyScript or similar
-
1thanks @neil, I accepted this answer because it contained a solution, even though it's better not to.– nizz0kOct 28, 2016 at 8:57
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.
-
-
-
You dont need to reference the
custom.css
file. If it has any styling in it, it's automatically loaded ;)– LodderOct 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.– MikanOct 28, 2016 at 12:57