Tagged: post
-
AuthorPosts
-
September 19, 2023 at 8:15 pm #1419617
I tried usen the css from documentation, but this is styling both the image, the post content and the footer. All on the posts.
How to only style featured image full width: https://floradanicadyner.iconiq-dev.dk/hvad-betyder-maerkerne/
September 21, 2023 at 1:52 am #1419798Hi BenjaminSpeedtsberg,
I tried to check your site however it seems to be still in Maintenance mode:
Sorry, we are currently updating our site - please try again later.
Best regards,
NikkoSeptember 21, 2023 at 7:00 am #1419826Hi, i’m sorry, see private content. :-)
September 22, 2023 at 3:47 am #1419967Hi BenjaminSpeedtsberg,
Thanks for giving us admin access, I have added this CSS code in Enfold > General Styling > Quick CSS:
.single-post main.content img.attachment-featured { width: 100%; }
Please review your website.
Best regards,
NikkoSeptember 22, 2023 at 6:06 am #1419984I see, thanks!
Still the same on mobile devices, and it looks like, that the image are not a separated class above the content, but instead, the image class are inside the content. That’s where I couldn’t figure out, how to style the image 100% only.
September 23, 2023 at 3:19 pm #1420119Hi BenjaminSpeedtsberg,
I see, please try to add this CSS code:
@media only screen and (max-width:767px) { #main { overflow: hidden; } .single-post main.content img.attachment-featured { width: 118%; max-width: none; margin-left: -9%; } }
Best regards,
NikkoSeptember 25, 2023 at 6:46 am #1420222It looks right!
There is just 2 issues with this.
– The top banner and footer is now full width on posts.
– And on mobile devices, the menu is full width.Maybe this is not possible? I saw that the image are under the content element on mobile, so as far as I see, the image element is only possible to style full width, if everything else is styled full width.
On desktop, the image is separated from the content, and therefor possible to style.September 26, 2023 at 9:52 am #1420385Hi BenjaminSpeedtsberg,
I think the reason for the issue you mentioned is caused by this CSS code:
#top.single .container { padding: 0 !important; width: 100% !important; max-width: 100% !important; }
You will need to make it more specific so it doesn’t affect other areas.
You can target the main area without affecting the header or footer section by replacing #top.single .container with #top.single #main .containerBest regards,
NikkoSeptember 27, 2023 at 8:08 pm #1420730Nice! It worked for the top bar. But the footer(page) is still affected. I assume that it’s becasuse we’re using af page to replace the footer.
Do you have any other tricks, that could fix this last thing? Otherwise, I think we will go with the standard version.
If just the image element was outside of the content, it would have been a lot easier! :O
Thanks again!
September 28, 2023 at 7:32 am #1420762Hi BenjaminSpeedtsberg,
I see, please replace #top.single #main .container to #top.single #main > .container_wrap > .container
Let us know if it helps, if it does not help then we’ll need to use a child theme.Best regards,
NikkoSeptember 28, 2023 at 7:36 am #1420764That did the job, thanks!
September 28, 2023 at 7:48 am #1420766Hi BenjaminSpeedtsberg,
You’re welcome!
I’m glad that we could help you :)Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.