-
AuthorPosts
-
February 2, 2023 at 6:02 pm #1396432
hello together
I have added a text field here
link 1 below:i made this textfield slightly transparent with a Custom CSS Class.
Code see below:
/*Custom CSS Class*/
.formatfam{
background-color: rgba(255,255,255,0.7);
}
This works fine.What do I have to do so that it is only visible on the PC?
and not also on the phone?
So the background on the phone stays full white.If I enter the same class for a table it will not be transparent?
Link 2 below:thanks in advance
kind regards Franz
February 3, 2023 at 4:09 am #1396475Hey schweg33,
Thank you for the inquiry.
You can use a css media query to control on which device or screen width the css modification should be applied. Please replace the css with the following code.
@media only screen and (min-width: 768px) { /* Add your Desktop Styles here */ .formatfam { background-color: rgba(255, 255, 255, 0.7); } }
Best regards,
IsmaelFebruary 3, 2023 at 7:42 am #1396499Hello Ismael
this actually works great
but
now of course the white background on the phone disappearscan this code be extended.
that mobile the background remains full white.thanks
kind regards
FranzFebruary 4, 2023 at 10:20 pm #1396686Hi,
Thanks for your patience, but I checked the two links above with Chrome Dev Tools and my Android device and the white background color for the .formatfam text shows on my mobile device, perhaps you have sorted this out already?Best regards,
MikeFebruary 5, 2023 at 8:32 am #1396710Hello Mike
I have reinstated the old codethis one
/*Custom CSS Class*/
.formatfam{
background-color: rgba(255,255,255,0.7);
}
because the page is onlineIf I use this code
@media only screen and (min-width: 768px) {
/* Add your Desktop Styles here */
.formatfam {
background-color: rgba(255, 255, 255, 0.7);
}
}
the white background is gone on mobile, only the text is still therethanks in advance
kind regards
FranzTranslated with http://www.DeepL.com/Translator (free version)
February 5, 2023 at 1:01 pm #1396735Hi,
Thanks for the feedback, I believe that I misunderstood, for desktop you would like a slightly transparent background color, and for mobile you would like a solid background color, correct?
Try this css instead:@media only screen and (max-width: 767px) { #top .formatfam { background-color: rgba(255, 255, 255, 1); } } @media only screen and (min-width: 768px) { #top .formatfam { background-color: rgba(255, 255, 255, 0.7); } }
Best regards,
MikeFebruary 5, 2023 at 2:24 pm #1396743Hello Mike
Thanks a lotso it fits great
only:
if I do the same link see belownothing happens
the table is not transparent?
is this also possible?thank you and
kind regards
FranzFebruary 5, 2023 at 3:56 pm #1396758Hi,
Thanks for the feedback, for the table which has two different background colors for odd and even rows, I assume that for the desktop you want slightly transparent background colors, and for mobile, you would like the solid two background colors that it is now, correct?
Try this css:@media only screen and (min-width: 768px) { #top.page-id-12139 .main_color .pricing-table>li:nth-child(odd) { background: rgba(248, 248, 248, 0.7); } #top.page-id-12139 .main_color .pricing-table>li:nth-child(even) { background-color: rgba(145, 145, 145, 0.7); } }
Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
After applying the css, please clear your browser cache and check.Best regards,
MikeFebruary 5, 2023 at 4:30 pm #1396761Thanks Mike
now it looks great :-)I have now deleted the page no
is that right?@media only screen and (min-width: 768px) {
#top .main_color .pricing-table>li:nth-child(odd) {
background: rgba(248, 248, 248, 0.7);
}
#top. main_color .pricing-table>li:nth-child(even) {
background-color: rgba(145, 145, 145, 0.7);
}
}then the question
what do i have to do
if i have to write several page numbers
for example 12139 and 11724@media only screen and (min-width: 768px) {
#top.page-id-12139 .main_color .pricing-table>li:nth-child(odd) {
background: rgba(248, 248, 248, 0.7);
}
#top.page-id-12139 .main_color .pricing-table>li:nth-child(even) {
background-color: rgba(145, 145, 145, 0.7);
}
}thank you
kind regards
FranzFebruary 5, 2023 at 4:41 pm #1396762Hi,
If you are going to use this for multiple tables on different pages but do not want to apply it to every table on the site, I recommend adding a custom class to the tables.
Such as you did above with formatfam for example try adding the custom class and use this css:@media only screen and (min-width: 768px) { #top .main_color .formatfam .pricing-table>li:nth-child(odd) { background: rgba(248, 248, 248, 0.7); } #top .main_color .formatfam .pricing-table>li:nth-child(even) { background-color: rgba(145, 145, 145, 0.7); } }
If this doesn’t help after you add the custom class we can check again and adjust the css.
Best regards,
MikeFebruary 5, 2023 at 7:06 pm #1396778many thanks
Mikeyou can close this request
thank you for your excellent support
kind regards
FranzFebruary 5, 2023 at 7:36 pm #1396781Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘transparent yes or now’ is closed to new replies.