ginna Posted October 17, 2023 Share Posted October 17, 2023 Hi All! I am in the process of rebuilding my website and have solid gradients that each appear over an image upon hovering, I've lowered the opacity of the gradient (opacity .4) for my desired look on each but the problem is that it is also affecting the text that is on top of the gradient. I would like only the gradient opacity to be lowered and the text to stay at full opacity. Is there a way to add custom css so that when I lower the opacity of the gradient it does not affect my text on top of it? Any help would be appreciated! Thanks! P.S I have included a screenshot of the problem and the customized css. Link to comment
tuanphan Posted October 21, 2023 Share Posted October 21, 2023 Hi, Can you share link to page in screenshot? We can check code easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
ginna Posted October 21, 2023 Author Share Posted October 21, 2023 Yes! I believe this is what you meant. If not please let me know. Thank you for your help! Link to comment
Web_Solutions Posted October 22, 2023 Share Posted October 22, 2023 10 hours ago, ginna said: Yes! I believe this is what you meant. If not please let me know. Thank you for your help! Can you share your website URL? If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible. Link to comment
ginna Posted October 22, 2023 Author Share Posted October 22, 2023 Yes! https://www.ginapagnotta.com/ Link to comment
Web_Solutions Posted October 22, 2023 Share Posted October 22, 2023 3 minutes ago, ginna said: Yes! https://www.ginapagnotta.com/ Replace this code(See attached image) with the code below. .list-item-content { margin-top: -134%; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4) 25%,rgba(0, 0, 0, 0.4) 75%); padding: 1rem; transition: all 0s; z-index: 99; opacity: 0; } .list-item:hover .list-item-content { transition: all 0s; opacity: 1; } ginna 1 If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible. Link to comment
ginna Posted October 22, 2023 Author Share Posted October 22, 2023 This seems to be working! Can I ask if there is a way to change the text to white? Thank you! Link to comment
Web_Solutions Posted October 22, 2023 Share Posted October 22, 2023 2 minutes ago, ginna said: This seems to be working! Can I ask if there is a way to change the text to white? Thank you! Sorry I didn't understand. The text already white. If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible. Link to comment
ginna Posted October 22, 2023 Author Share Posted October 22, 2023 The text changed to black when I pasted the code in. I tried to add in the part of the code that was making the text white but it isn't working. Link to comment
Web_Solutions Posted October 22, 2023 Share Posted October 22, 2023 5 minutes ago, ginna said: The text changed to black when I pasted the code in. I tried to add in the part of the code that was making the text white but it isn't working. Can you add the code again and save it? It will be easier to check. If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible. Link to comment
Web_Solutions Posted October 22, 2023 Share Posted October 22, 2023 6 minutes ago, ginna said: The text changed to black when I pasted the code in. I tried to add in the part of the code that was making the text white but it isn't working. I got it. You have removed this code. That's why text is black. Please add this code again. .list-item-content * { color: #fff !important } If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible. Link to comment
ginna Posted October 22, 2023 Author Share Posted October 22, 2023 I did try this and save it, perhaps I have it wrong? Link to comment
Solution Web_Solutions Posted October 22, 2023 Solution Share Posted October 22, 2023 (edited) 3 minutes ago, ginna said: I did try this and save it, perhaps I have it wrong? You have putted the code in the middle of code. You should need to put it bottom. See the image Edited October 22, 2023 by Web_Solutions If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible. Link to comment
ginna Posted October 22, 2023 Author Share Posted October 22, 2023 That worked great! Thank you so much! Link to comment
Web_Solutions Posted October 22, 2023 Share Posted October 22, 2023 28 minutes ago, ginna said: That worked great! Thank you so much! Welcome! If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment