How to add multiple classes to one rule?
-
Hi,
I’m using the Tesseract Theme and tried implementing some code into the style.css to make the Header links have an underline hover effect.
I finally got it to work with all the links but had to copy the code multiple times for each link which might be causing my website to load slowly.
.menu-item-19{ display: inline-block; position: relative; padding-bottom: 3px; } .menu-item-19:after { content: ''; display: block; margin: auto; height: 3px; width: 0px; background: transparent; transition: width .5s ease, background-color .5s ease; } .menu-item-19:hover:after { width: 100%; background: #fff; } .menu-item-118{ display: inline-block; position: relative; padding-bottom: 3px; } .menu-item-118:after { content: ''; display: block; margin: auto; height: 3px; width: 0px; background: transparent; transition: width .5s ease, background-color .5s ease; } .menu-item-118:hover:after { width: 100%; background: #fff; } .menu-item-17{ display: inline-block; position: relative; padding-bottom: 3px; } .menu-item-17:after { content: ''; display: block; margin: auto; height: 3px; width: 0px; background: transparent; transition: width .5s ease, background-color .5s ease; } .menu-item-17:hover:after { width: 100%; background: #fff; } .menu-item-16{ display: inline-block; position: relative; padding-bottom: 3px; } .menu-item-16:after { content: ''; display: block; margin: auto; height: 3px; width: 0px; background: transparent; transition: width .5s ease, background-color .5s ease; } .menu-item-16:hover:after { width: 100%; background: #fff; }
I’ve tried just putting commas in but it doesn’t work this way.
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘How to add multiple classes to one rule?’ is closed to new replies.