-
AuthorPosts
-
November 21, 2020 at 2:51 pm #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
November 23, 2020 at 2:25 pm #1262384This reply has been marked as private.November 23, 2020 at 9:48 pm #1262481Hi Mick,
Could you please attach some screenshots of the issue?
Best regards,
VictoriaNovember 23, 2020 at 10:48 pm #1262508This reply has been marked as private.November 24, 2020 at 12:05 am #1262544Hi 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,
VictoriaNovember 24, 2020 at 1:30 pm #1262650Hi 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 versionsi’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
November 24, 2020 at 6:48 pm #1262773Hi hmt,
Could you please attach a mockup of what you’re trying to achieve?
Best regards,
VictoriaNovember 24, 2020 at 9:23 pm #1262808This reply has been marked as private.November 25, 2020 at 6:25 pm #1263051This reply has been marked as private.November 25, 2020 at 7:56 pm #1263067Hi 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,
VictoriaNovember 25, 2020 at 9:05 pm #1263077This reply has been marked as private.November 27, 2020 at 12:15 pm #1263501This reply has been marked as private.November 27, 2020 at 5:42 pm #1263551This reply has been marked as private.November 30, 2020 at 4:16 pm #1264011Hello,
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 codediv#attachment_1754.wp-caption.alignleft {
width: 200px;
}
.homeimage {
width: 190px;
}Please answer me.
Best regards,
Mick
December 6, 2020 at 4:45 pm #1265280Hi,
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,
MikeDecember 7, 2020 at 5:29 pm #1265523Hi 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
December 8, 2020 at 1:51 pm #1265749Hi,
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,
MikeDecember 8, 2020 at 10:10 pm #1265843Hi 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
December 9, 2020 at 1:11 pm #1265981Hi,
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,
MikeDecember 9, 2020 at 2:43 pm #1266005Hi Mike,
how did you test the above css. On which place in the script?
Best regards,
Mick
December 10, 2020 at 1:32 pm #1266288Hi,
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,
MikeDecember 10, 2020 at 1:41 pm #1266290Hi,
no i use the classic editor in source-code mode, sometimes in advanced-mode.
Best regards,
Mick
December 10, 2020 at 2:48 pm #1266299December 10, 2020 at 2:58 pm #1266301Hi,
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
December 11, 2020 at 3:24 pm #1266557Hi,
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,
MikeDecember 11, 2020 at 8:49 pm #1266664Dear 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
MickDecember 12, 2020 at 1:51 am #1266703Hi,
If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Problems with access to elements via css in tablet and smartphone versions’ is closed to new replies.