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

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

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

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
Community showcase
Posted Tuesday in Statuspage

Introducing Statuspage Getting Started guides! First up: What is Statuspage?

Over the next several weeks we'll be sharing some of our Getting Started guides here in the community. Throughout this series of posts, we'd love to hear from customers and non-customers ab...

239 views 4 1
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