Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Show a button only if I hover the section

Hello! I am working on my custom character sheet and saw that in roll20s D&D5e character sheet, when hovering over the "Resources" section, a cogwheel will show up. Otherwise the cogwheel is invisible. That's a neat thing that I can't seem to reproduce. I've searched the forums, only found tooltips (which is great too, gonna steal for sure), but can't find anything of the sort where hovering over a section lets you see a button. I want to use it to allow the players to modify attribute used in d&d 5e skill check, but don't want to show cogwheel bloat, so showing them only when hovering over the skill in question would do the trick. I take I should use the :hover pseudoclass for css, but uncertain how to tackle it. Does anybody have any pointers? Or maybe it was already done on some custom character sheet in the repository, so I can take a look? Cheers
1743250674
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
It works the same as the tooltips. You're just targeting the cog wheel element instead of a tooltip div. Note, this is also essentially the same as creating tabs on a sheet.
I get that, the problem is I can't get it to work without hiding everything else in the section until hovered. I'm not exactly a css wizard, I base 100% of my character sheet off of examples I find here and there, just can't find one for this exact scenario. I take there's no possibility of checking the official character sheets' by roll20 code?
1743350212
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You can inspect the roll20 sheet's code and get the styling from that, but the exact css is going to depend on how your html is set up.