Why confluence change ">" sybol in HTML part of page into ">" and how to avoid it?

Hi all.
I am trying to add drop down menu in Confluence page but drop down functionality does not work because when I check .css markup of page in Google Chrome developer tools I noticed that instead of ">" sign there was ">" group of signs. If I change it back into ">" in HTML Chrome developer tool my drop down menu work perfectly. Unfortunately when I refresh the page you will get the same error.
In case of using source editor application you will not be able to see ">" group of signs.
How to avoid this difficulty and make my drop down menu work?
Functionality of the menu is written in .css.
Error.jpg

2 answers

This widget could not be displayed.
Stephen Deutsch Community Champion Jul 11, 2017

How are you inserting the CSS into the page? Custom CSS? User Macro? Custom HTML?

I used macro "Style" and then added CSS markup.

This widget could not be displayed.
Stephen Deutsch Community Champion Jul 12, 2017

It seems like there is a "bug" in the CSS Macro from Adaptavist (not so much of a bug as a security measure by Atlassian I would assume). Here are some possible workarounds:

  • Enable the HTML Macro and include your CSS there instead (inside of <style> tags).
  • if you are sure that ul will be the only direct children of li:hover, just replace "> ul" with ":nth-child(n)", which should select all direct children and won't be changed in the macro evaluation process.

 

Hi Stephen. Thank you a lot for your answer!
I tried to activate using HTML macro, but I could not.

According to documentation I should " Choose the cog icon at top right of the screen --> then choose Confluence Admin. -->Select 'Plugins' in the left-hand panel. This will display the installed plugins active for this Confluence installation.
--> Click' 'HTML macros', then click 'Enable Plugin'."

Unfortunately there is no such menu. I have found the following menus Choose the cog icon -->Add-ons --> In the manager of add-ons I selected All add-ons --> I tried to find HTML macros but there is no such option.


When I try to type {HTML} to add there <style> and CSS code in document body well it does not works. The code and {HTML} are displayed as a text.


Could you please tell me how to enable HTML Macro?

Or in cloud version they are disabled?

By the way, additional great thanks for advising me to use :nth-child(n) now my menu work perfectly!))

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

150 views 2 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you