Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #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

    #1396475

    Hey 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,
    Ismael

    #1396499

    Hello Ismael
    this actually works great
    but
    now of course the white background on the phone disappears

    can this code be extended.
    that mobile the background remains full white.

    thanks
    kind regards
    Franz

    #1396686

    Hi,
    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,
    Mike

    #1396710

    Hello Mike
    I have reinstated the old code

    this one
    /*Custom CSS Class*/
    .formatfam{
    background-color: rgba(255,255,255,0.7);
    }
    because the page is online

    If 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 there

    thanks in advance

    kind regards
    Franz

    Translated with http://www.DeepL.com/Translator (free version)

    #1396735

    Hi,
    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,
    Mike

    #1396743

    Hello Mike
    Thanks a lot

    so it fits great

    only:
    if I do the same link see below

    nothing happens

    the table is not transparent?
    is this also possible?

    thank you and
    kind regards
    Franz

    #1396758

    Hi,
    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,
    Mike

    #1396761

    Thanks 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
    Franz

    #1396762

    Hi,
    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,
    Mike

    #1396778

    many thanks
    Mike

    you can close this request

    thank you for your excellent support

    kind regards
    Franz

    #1396781

    Hi,
    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

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘transparent yes or now’ is closed to new replies.