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

0 vote
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.

0 vote
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 Join to answer
Community showcase
Teodora [Botron]
Published Feb 15, 2018 in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

1,123 views 6 19
Read article

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot