Hi Tim,
On 20 Aug 2016, at 14:32, Tim Dudgeon
<tdudgeon.ml(a)gmail.com> wrote:
Hi Folks,
I'm struggling with something I thought should be quite simple.
I want to style a series of elements in a page (box macro) so want to
just define a css style for this just for this one page.
I was trying to set styles using html content like this:
{{html}}<style>
h1 {color:red;}
p {color:blue;}
</style>
{{/html}}
but the style definition is not getting included (though in other cases
like this {{html}}<b>bold text</b>{{/html}} its working as expected).
What am I doing wrong here?
BTW it’s not a good web practice to put CSS inside the HTML body. I suggest using
http://platform.xwiki.org/xwiki/bin/view/DevGuide/SkinExtensionsTutorial
Can you try with this and see if it helps?
Thanks
-Vincent
PS1: You can use your browser dev tool to see what CSS you need to write to style what you
want
PS2: The box macro supports defining some css class that can be added, see
http://extensions.xwiki.org/xwiki/bin/view/Extension/Box+Macro#HParametersd…
Thanks
Tim