Superscript and margins in text buttons

ajnsson8057
ajnsson8057 Community Member Posts: 6
Hi!

I use text buttons in my Lectora file, and for a few numbers in them I need to use superscript. I'd also like to add a bit of a margin to the buttons. Simple enough, but I don't see how to do it?

/Anna

Comments

  • jasonadal
    jasonadal Community Member Posts: 441 ♪ Opening Act ♪
    You might be able to use a solution similar to what I've done to style text boxes to change the background using a RunJS and to add a tag to objects with a specific CSS class. This is something I worked on because I wanted to change the background color of a text box and have screen readers read the text when the contents change.

    Here's the link to the sample I submitted and described for possible future upgrades: Aria Live on text boxes

    In a nutshell, the RunJS creates a class and defines a property to add to any object with that class. I then add the CSS class to the object (for the aria-live property). For the change in the background color, I use a RunJS to get the object name then change the background color.

    The above sample has both functions, so it may be a helpful starting point. I'm not sure what the HTML values would be for fonts and padding, though, so others may be able to chime in to add.