Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2019
    Thanked 0 Times in 0 Posts

    Help with css on list

    Hello, first of all im not the big html/css expert so bear over with me.

    I have a website which use data from a DB which then puts it in a list. The way the list is made is with FLASK in the html (its a school project so i have to use FLASK). I have made the list clickable so its starts a function when clicked which changes a picture on the website and it works like a charm. My issue is, that i would like to make the list object a different color when its clicked to show that its the active object. Most of my css is taken from w3school stylesheet, but cant find anhything to do this. I have tried with the li:active in css but it only changes the color when press and changes back when mousebutton is released.

  2. #2
    Administrator VIPStephan's Avatar
    Join Date
    Jan 2006
    Halle (Saale), Germany
    Thanked 1,360 Times in 1,329 Posts
    You need to add a specific class to active items and use that class as selector in the stylesheet to style the element differently.


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts