Shopify themes, liquid, logos, and UX
Hi I have problem with dawn theme where some of the brand images does not load until I refresh the page after the initial load, I've tried to different browsers and I use private window to do the testing.
I found this from shopify reddit for DAWN theme to put in base.css, but it didn't work.
.js .product__media { width: 100% !important; }
Solved! Go to the solution
This is an accepted solution.
There's something in your code adding an inline style to all brand images that makes their max-width zero
Sometimes it sets the value to zero and other times to 150px. It's hard to asses what could be causing it, for how it behaves, I think there's some JavaScript code that's relying in an event listener that sometimes is triggered before the piece of code is loaded.
If you want a hotfix, you could set the max width manually with this CSS rule:
.hc-brands-item img {
max-width: 150px !important;
}
I'm not a huge fan of the above as we're not understanding what's going on, but it might do the trick while you figure it out.
Hello 🙂
Could you please share your store URL and some steps to replicate the issue?
Hi sure, https://hyotyvoima.fi/ when you load home page first time brand images does not load, but after your refresh the page with F5 images loads. also when you go to "Tuotekatalogi" and select "selaa tuotteita" only half of the brands loads under Aurinkopaneelit until you refresh the page with F5.
This is an accepted solution.
There's something in your code adding an inline style to all brand images that makes their max-width zero
Sometimes it sets the value to zero and other times to 150px. It's hard to asses what could be causing it, for how it behaves, I think there's some JavaScript code that's relying in an event listener that sometimes is triggered before the piece of code is loaded.
If you want a hotfix, you could set the max width manually with this CSS rule:
.hc-brands-item img {
max-width: 150px !important;
}
I'm not a huge fan of the above as we're not understanding what's going on, but it might do the trick while you figure it out.
alright, I'll go with that for now. I'll try to figure out what is wrong there. Thank you for your help!
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024