Match custom css with html ul/li structure
-
Hey
I am not sure where to put this, so I will give this a go…
I have a card grid on my site. I was theming this grid layout and came across this code that I want for my cards.
I have added some red borders, to try to see myself out of it, but I am a bit stuck right now. I asked Chat GPT, but that made things worth…
Current layout where I am now. Idea is to make image full background as in the ooriginal example. Title always on the card together with logo. Then display buttons and data on mouse over. Here is the css:/******** Store Card - Grid View *******/ /*#wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .store-wrapper .store-content*/ #wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .store-wrapper { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 0px; font-family: 'Roboto', sans-serif; border: 1px solid red; } #wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .store-content .store-info, #wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .store-wrapper .store-content { width: 100%; height: 36rem; border-radius: 25px; border: 1px red solid; overflow: hidden; cursor: pointer; position: relative; color: $color-primary-white; box-shadow: 0 10px 30px 5px rgba(0, 0, 0, 0.2); #store-info img { position: absolute; object-fit: cover; width: 100%; height: 100%; top: 0; left: 0; opacity: 0.9; transition: opacity .2s ease-out; border: 3px solid pink; } #wcfmmp-stores-wrap ul.wcfmmp-store-wrap li .store-data h2 { position: absolute; inset: auto auto 30px 30px; margin: 0; transition: inset .3s .3s ease-out; font-family: 'Roboto Condensed', sans-serif; font-weight: normal; text-transform: uppercase; border: 3px solid pink; } p, a { position: absolute; opacity: 0; max-width: 80%; transition: opacity .3s ease-out; } p { inset: auto auto 80px 30px; } a { inset: auto auto 40px 30px; color: inherit; text-decoration: none; } &:hover h2 { inset: auto auto 220px 30px; transition: inset .3s ease-out; } &:hover p, &:hover a { opacity: 1; transition: opacity .5s .1s ease-in; } &:hover img { transition: opacity .3s ease-in; opacity: 1; } } .material-symbols-outlined { vertical-align: middle; }I made it to only the beginning which shows on the screen cap. And here is the html from my site I am trying to adapt to with respect for divs and classes:
<div class="wcfmmp-stores-content"> <ul class="wcfmmp-store-wrap"> <li class="wcfmmp-single-store item woocommerce coloum-2"> <div class="store-wrapper"> <div class="store-content"> <div class="store-info" style="background-image: url( 'https://svalinnart.local/wp-content/uploads/2023/12/A-Sense-of-Scale.jpg');"></div> </div> <div class="store-footer" style="height: 372.8125px;"> <div class="store-avatar lft"> <img decoding="async" src="https://svalinnart.local/wp-content/uploads/2023/12/HBH-Works-Logo-W-on-B-S.png" alt="Logo"> </div> <div class="store-data-container rgt"> <div class="store-data"> <h2> <a href="https://svalinnart.local/gallery/hbhworx?v=dd65ef9a5579">HBH Works</a> </h2> <div class="bd_rating"> <div style="" class="wcfmmp-store-rating" title="No reviews yet!"> <span style="width: 0%"> <strong class="rating">0</strong> out of 5 </span> </div> <div class="spacer"></div> <div class="spacer"></div> </div> <p class="store-address">Amaliegade 20b, 3. th., 8000 Aarhus, Denmark</p> <p class="store-phone"> <i class="wcfmfa fa-envelope" aria-hidden="true"></i> [email protected] </p> <p class="store-phone"> <i class="wcfmfa fa-phone" aria-hidden="true"></i> +45 93 30 03 04 </p> <p class="store-phone"> <i class="wcfmfa fa-globe" aria-hidden="true"></i> <a href="http://hbhworx.com">hbhworx.com</a> </p> <p class="store-enquiry"><a class="wcfm_catalog_enquiry " data-store="4" data-product="0" href="#"><span class="wcfmfa fa-question-circle fa-question-circle"></span> <span class="add_enquiry_label">Inquiry</span></a></p> <div class="wcfm-clearfix"></div> </div> </div> <div class="spacer"></div> <a href="https://svalinnart.local/gallery/hbhworx?v=dd65ef9a5579" class="wcfmmp-visit-store">Visit <span>gallery</span></a> </div> </div> </li> <li class="wcfmmp-single-store item woocommerce coloum-2"> <div class="store-wrapper"> <div class="store-content"> <div class="store-info" style="background-image: url( 'https://svalinnart.local/wp-content/uploads/2023/12/2023-12-02-Your-Stains-Are-Everywhere-2048px-101-1.jpg');"></div> </div> <div class="store-footer" style="height: 372.8125px;"> <div class="store-avatar lft"> <img decoding="async" src="https://svalinnart.local/wp-content/uploads/2023/12/Logo-Square-Svalinn-Art-WonB_S-1.png" alt="Logo"> </div> <div class="store-data-container rgt"> <div class="store-data"> <h2> <a href="https://svalinnart.local/gallery/svalinn-art?v=dd65ef9a5579">Svalinn Art</a> </h2> <div class="bd_rating"> <div style="" class="wcfmmp-store-rating" title="No reviews yet!"> <span style="width: 0%"> <strong class="rating">0</strong> out of 5 </span> </div> <div class="spacer"></div> <div class="spacer"></div> </div> <p class="store-phone"> <i class="wcfmfa fa-phone" aria-hidden="true"></i> +45 93 30 03 04 </p> <p class="store-phone"> <i class="wcfmfa fa-globe" aria-hidden="true"></i> <a href="http://hbhworx.com">hbhworx.com</a> </p> <p class="store-enquiry"><a class="wcfm_catalog_enquiry " data-store="3" data-product="0" href="#"><span class="wcfmfa fa-question-circle fa-question-circle"></span> <span class="add_enquiry_label">Inquiry</span></a></p> <div class="wcfm-clearfix"></div> </div> </div> <div class="spacer"></div> <a href="https://svalinnart.local/gallery/svalinn-art?v=dd65ef9a5579" class="wcfmmp-visit-store">Visit <span>gallery</span></a> </div> </div> </li> <div class="wcfm-clearfix"></div> </ul> <!-- .wcfmmp-store-wrap --> </div>So if anyone has a word of advice, I would be very thankful. Plugin does not support or answer, so I am hacking my way through.
ThxThe page I need help with: [log in to see the link]
The topic ‘Match custom css with html ul/li structure’ is closed to new replies.