Please Help Me Styling HTML Quiz!!

by 6 replies
7
Hey!

I am making a Quiz but I am stuck with something and it is really really annoying me.

I want to make it so when someone hovers over a answer it will highlight like on this quiz:

Are You in Love Quiz

Please help me with this at the moment I only have labels for each one and I can change the background color on the label but it only goes over the text + I cannot make it change color on hover.

Please can you help me?

Thanks!!
#programming #html #quiz #styling
  • Come on guys! Does anyone know please?

    This is really annoying me

    Ricky
    • [1] reply
    • You can use the CSS event :hover to change the background color of that class when the user hovers their mouse over it.
  • I can't give a certain answer without seeing your code but you should use something like the following code for the class you are using for the answers:

    Code:
    li.hover {
    background: #e00000;
    color: #fff
    }
    You can inspect such styles with Google Chrome browser. Right click on any element of a web page and select Inspect Element, it will display its HTML and CSS code.
  • li.hover {
    color:#000;
    background: #e00000;
    }

    Try this.
  • li:hover here....

    why li.hover ?

    a DOT are for CLASS !

    So:

    <li class='hover'> will be represented by li.hover

    For HOVER here,

    we need to user: li:hover

    In the demo, the guy were using javascript to add class on hover
  • duplicate post sorry

    have a nice day

Next Topics on Trending Feed