Can I safely remove empty CSS codes?

  • movz
    Asked on January 27, 2018 at 1:40 PM

    Trying to clean my css up, still don't know much about css but thought I'd start learning albeit slowly.

    Things like this, are they necessary or can I delete what I think is empty css?
    Should there be info within the {  } or does the line serve a purpose?

    1. #cid_16 div.hover {

    }

    2. #cid_16 span.form-sub-label-container {

    }

    3. .form-sub-label-container {

    }

  • Support_Management Jotform Support
    Replied on January 27, 2018 at 4:49 PM

    That's correct - Those are empty chunks of codes that can be safely deleted. For as long as there are no styles within these CSS selectors, you can safely remove them or keep them there since they are not doing anything in the first place.

    My recommendation is to start with something like W3SCHOOLS https://www.w3schools.com/css/default.asp

    It's a good online resource to learn CSS.

  • movz
    Replied on January 27, 2018 at 8:32 PM

    Thanks Jim, much appreciated! Have come across w3schools in my css endeavours. Will return there more.