Viewing 27 posts - 1 through 27 (of 27 total)
  • Author
    Posts
  • #1261960

    Hello,

    i have some problems with access to elements in tablet and smartphone versions.

    The header background image, in the desktop version its visible, here is the code, it’s in the style.css and has no screen
    -resolution rules, so it should be visible in all versions but it’s not.

    div.container.av-logo-container div.inner-container {
    background-image: url(“https://www.frauenaerzte-steinbach.de/wp-content/uploads/2020/11/header-4.jpg”);
    background-repeat: no-repeat;
    background-position: right top;
    }

    i tried to build it in directly in the tablet landscape code with

    @media only screen and (max-device-width : 1024px) and (orientation : landscape) {
    div.container.av-logo-container div.inner-container {
    background-image: url(“https://www.frauenaerzte-steinbach.de/wp-content/uploads/2020/11/header-4.jpg”) !important;
    background-repeat: no-repeat;
    background-position: right top;
    }
    }

    and another image on portrait version.

    @media only screen and (max-device-width : 1024px) and (orientation : portrait) {
    div.container.av-logo-container div.inner-container {
    background-image: url(“https://www.frauenaerzte-steinbach.de/wp-content/uploads/2020/11/header-6.jpg”) !important;
    background-repeat: no-repeat;
    background-position: right top;
    }
    }

    both doesn’t work

    In smartphones its set to hide with

    @media only screen and (max-device-width : 768px) and (orientation : landscape) {
    div.container.av-logo-container div.inner-container {
    background-image: none !important;
    }
    }

    that works for both orientations.

    Best regards,

    Mick

    #1262384
    This reply has been marked as private.
    #1262481

    Hi Mick,

    Could you please attach some screenshots of the issue?

    Best regards,
    Victoria

    #1262508
    This reply has been marked as private.
    #1262544

    Hi hmt,

    Here is the code you can put in Enfold > General Styling > Quick Css,  if it does not work, put into themes/enfold/css/custom.css

    
    
    @media only screen and (max-width : 1024px) and (min-width : 768px) {
      #top div.container.av-logo-container div.inner-container {
        background-image: url(https://www.frauenaerzte-steinbach.de/wp-content/uploads/2020/11/header-4.jpg) !important;
        background-repeat: no-repeat;
        background-position: right top;
      }
    }
    

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1262650

    Hi Victoria,

    thank you very much, that works fantastic.

    I have 2 more problem-sites.

    1. The “TEAM” site
    I cant place and resize the 5 small images
    I need that for the tablet portrait- and the smartphone versions

    i’ve tried to place them on style.css, resize is impossible.

    @media only screen and (max-device-width : 1024px) and (orientation : portrait) {
    div#attachment_1765.wp-caption.alignleft {
    margin-left: 102px;
    }

    div#attachment_1768.wp-caption.alignleft {
    margin-left: 94px;
    }

    /* Second Row */
    div#attachment_1771.wp-caption.alignleft {
    margin-left: 140px;
    margin-right: 188px;
    }

    div#attachment_1762 {
    margin-right: 60px;
    }
    }

    that does’t work

    2. The “HOME” site

    I cant resize the image, on smartphone versions and cant set the margins of the dotted list.

    Can you help me?

    Best regards,

    Mick

    #1262773

    Hi hmt,

    Could you please attach a mockup of what you’re trying to achieve?

    Best regards,
    Victoria

    #1262808
    This reply has been marked as private.
    #1263051
    This reply has been marked as private.
    #1263067

    Hi Mick,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #1263077
    This reply has been marked as private.
    #1263501
    This reply has been marked as private.
    #1263551
    This reply has been marked as private.
    #1264011

    Hello,

    o.k. i try it again, with some expilicit code questions, is that o.k. for you?

    I built the home site new and want to do it with the team site as well. But the home site
    first.

    I removed the inline styles and put them to the style.css

    That works for the full screen verson with (this has no resolution rules)

    ul#homelist {
    margin-left: 540px;
    }

    But in the tablet version i cant get access to it via css with

    @media only screen and (max-device-width : 1024px) and (orientation : landscape) {
    ul#homelist {
    margin-left: 440px;
    }
    }

    the same in lower resolutions.

    Icant get access to the image and the imageframe via css in full screen version, so i cant resize it in lower
    resolutions. Heres the code

    div#attachment_1754.wp-caption.alignleft {
    width: 200px;
    }
    .homeimage {
    width: 190px;
    }

    Please answer me.

    Best regards,

    Mick

    #1265280

    Hi,
    Sorry for the late reply, unfortunately, the login didn’t work for me, but I did find on your /Team/ page the 5 team images, the last image has “alignright” instead of “alignleft” as the other images. I also found that your css doesn’t include the first image, the class for the second image is used twice “#attachment_1765”, you also have a rouge paragraph tag between the first and second images.
    Please try this css in the WordPress > Customize > Additional CSS field, since it has the highest priority:

    @media only screen and (max-width: 1024px) { 
    #top.page-id-22 #wrap_all #main .post-entry-22 div#attachment_1762.wp-caption.alignleft {
    		margin: auto !important;		
    		width: 100px !important;		
    }
    #top.page-id-22 #wrap_all #main .post-entry-22 div#attachment_1765.wp-caption.alignleft {		
    		margin: auto !important;
    		width: 100px !important;		
    }
    #top.page-id-22 #wrap_all #main .post-entry-22 div#attachment_1768.wp-caption.alignleft {
    		margin: auto !important;
    		width: 100px !important;
    }
    #top.page-id-22 #wrap_all #main .post-entry-22 div#attachment_1771.wp-caption.alignleft {
    		margin: auto !important;
    		width: 100px !important;
    }
    #top.page-id-22 #wrap_all #main .post-entry-22 div#attachment_1374.wp-caption.alignright {
    		margin: auto !important;
    		width: 100px !important;
    		float: left !important;
    }
    }

    This css accounts for the errors above so you could try it as is, or you can use this to model your current css, but note the alignment of the last image (alignright), so if you correct the element you will also need to correct this css. I hope that makes sense.

    Best regards,
    Mike

    #1265523

    Hi Mike,

    thanks for your very helpful reply.

    I did it as you adviced, i modified your script with the media query orientations and put it in the quick css field.
    It works well so far, i have access to all elements in tablet and smartphone versions, but the smartphone portrait
    version still harms the tablet portrait version.

    Heres the code for the portrait versions

    @media only screen and (max-width: 1024px) and (orientation : portrait) {
    ul#homelist {
    margin-left: 20px !important;
    }
    #top.page-id-22 #wrap_all #main .post-entry-22 div#attachment_1762.wp-caption.alignleft {
    margin: auto !important;
    width: 128px !important;
    }
    #top.page-id-22 #wrap_all #main .post-entry-22 div#attachment_1765.wp-caption.alignleft {
    margin: auto !important;
    margin-left: 5px !important;
    width: 128px !important;
    }
    #top.page-id-22 #wrap_all #main .post-entry-22 div#attachment_1768.wp-caption.alignleft {
    margin: auto !important;
    margin-left: 8px !important;
    width: 128px !important;
    }
    #top.page-id-22 #wrap_all #main .post-entry-22 div#attachment_1771.wp-caption.alignleft {
    margin: auto !important;
    margin-left: 8px !important;
    width: 128px !important;
    }
    #top.page-id-22 #wrap_all #main .post-entry-22 div#attachment_1374.wp-caption.alignright {
    margin: auto !important;
    margin-left: 6px !important;
    width: 128px !important;
    float: left !important;
    }
    }

    The smartphone portrait is commented out actually. So it dont hit my tablet version.

    /*@media only screen and (max-width: 768px) and (orientation : portrait) {
    #top.page-id-22 #wrap_all #main .post-entry-22 div#attachment_1762.wp-caption.alignleft {
    margin: auto !important;
    width: 80px !important;
    }
    #top.page-id-22 #wrap_all #main .post-entry-22 div#attachment_1765.wp-caption.alignleft {
    margin: auto !important;
    margin-left: 5px !important;
    width: 80px !important;
    }
    #top.page-id-22 #wrap_all #main .post-entry-22 div#attachment_1768.wp-caption.alignleft {
    margin: auto !important;
    margin-left: 5px !important;
    width: 80px !important;
    }
    #top.page-id-22 #wrap_all #main .post-entry-22 div#attachment_1771.wp-caption.alignleft {
    margin: auto !important;
    margin-left: 5px !important;
    width: 80px !important;
    }
    #top.page-id-22 #wrap_all #main .post-entry-22 div#attachment_1374.wp-caption.alignright {
    margin: auto !important;
    margin-left: 6px !important;
    width: 80px !important;
    float: left !important;
    }
    }*/

    The smartphone landscape version is o.k and doesnt have any inluences to the tablet version
    I cant find out why that doesnt work in portrait.

    I send you an admin access, so you can see the code.

    Best regards,

    Mick

    #1265749

    Hi,
    Thank you for the feedback, please try adding this css for the mobile portrait view:

    @media only screen and (max-width: 767px) and (orientation : portrait) {
    #top.page-id-22 #wrap_all #main .post-entry-22 div#attachment_1768.wp-caption.alignleft {
    		clear: left !important;
    }
    }

    After applying the css, please clear your browser cache and check.

    Best regards,
    Mike

    #1265843

    Hi Mike,

    thank you for your reply.

    That works not, It still influences the tablet version.

    I added it to the quick css, but its the same problem.

    Best regards,

    Mick

    #1265981

    Hi,
    Please see the screenshots in the Private Content area, of mobile and tablet when I test the above css, can you try and take a screenshot of what you are seeing?

    Best regards,
    Mike

    #1266005

    Hi Mike,

    how did you test the above css. On which place in the script?

    Best regards,

    Mick

    #1266288

    Hi,
    I tested the css by injecting it into the browser. I note that the last team image is still “alignright” where all of the other ones are “alignleft”, I was going to try changing it but in the backend of the page seems blank with the Advanced Layout Builder and the default editor. Did you use the Advanced Layout Builder for the page?

    Best regards,
    Mike

    #1266290

    Hi,

    no i use the classic editor in source-code mode, sometimes in advanced-mode.

    Best regards,

    Mick

    #1266299

    Hi,
    Ok, can you try changing the last one to “alignleft”?

    Best regards,
    Mike

    #1266301

    Hi,

    o.k., i did that, but the last image jumps into the next row now, on all versions.

    The last image is now set to alignleft.

    Best regards,

    Mick

    #1266557

    Hi,
    Thank you for changing this, the reason the last image drops down a row is that the combined width of all of the images is wider than the page, for example, on the desktop the image widths are 213px, if they were 209px they would if in a single row.
    One thing we can do is remove the un-needed right margin on the last image to give the row more space, so in your Quick CSS I added

    #top.page-id-22 #wrap_all #main .post-entry-22 div#attachment_1374.wp-caption.alignleft {
                    margin-right: 0 !important;
    }

    This seems to solve for above 1230px.
    For below 430px I needed to target this specifically so I changed your media queries to include a min width, like this:
    @media only screen and (min-width: 430px) and (max-width: 768px) and (orientation : landscape) { ... }
    then I added this for below 430px:

    @media only screen and (max-width: 429px) {
    	#top.page-id-22 #wrap_all #main .post-entry-22 .wp-caption.alignleft {
    		width: 28% !important;
    	}
    }
    

    Please clear your browser cache and check.
    I also found this css in your child theme stylesheet, and it was causing issues for this so I commented it out.

    div#attachment_1765.wp-caption.alignleft {
    		margin-left: 2px;
    	}
    	
    	div#attachment_1768.wp-caption.alignleft {
    		margin-left: 2px;
    	}
    	
    	div#attachment_1771.wp-caption.alignleft {
    		margin-left: 1px;
    	}

    So now your page seems to look good on 425px & 375px mobile devices, with 3 images per row, but the smallest 320px will need to be 2 images per row to look good.

    Best regards,
    Mike

    #1266664

    Dear Mike,
    first of all we would like to thank you to the max for your patience and your detailed and professional help.
    Finally it’s done; everything works fine on tablet and smartphone in landscape and portrait mode.

    Once again THANK YOU. Please be so kind and close this topic.

    Best regards and all the best for the holidays, Yours
    Mick

    #1266703

    Hi,

    If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 27 posts - 1 through 27 (of 27 total)
  • The topic ‘Problems with access to elements via css in tablet and smartphone versions’ is closed to new replies.