In the mobile view, all content is padded from the border of the white-space. The featured image however, does not have such padding. Is it possible to create a code such that all media files are also not padded, so that the edges of the media files are in line with the border, just like the featured image?
In addition, is there a way to reduce the amount of space between the edges of the mobile view and the white part of the template? This refers to the greyish background that is in between the edges of the mobile view and the white part (where the content is on).
Thank you for your help! The code has eliminated the greyish background between the edges of the screen and the white area for content for each post. However, within the white area for content, the media files still have a padding from the edges of the mobile screen, in the same way as the text. Only the featured image is flushed from edge to edge of the mobile screen.
Is there a code that will also flush all other media files from edge to edge of the mobile screen?
I hope you are having an awesome day and thanks for contacting us regarding your query.
For this, I’ll have to take a closer look on your site at the actual elements and provide you with some more specific CSS. Kindly provide me with a link to a page with this so that I may be able to write up some CSS that should work for your setup.
Thank you so much for the code!
It works only on one side of the screen though. The left side of the media files is now flushed to the edge of the screen, but the right side is not. Also, the greyish background area on the right side of the screen has reappeared. Hopefully there’s a fix!
I have attached two screenshots. The first is the default view of the page on a mobile device. The second is the view if you swipe the page all the way to the left. In both screenshots the image is flushed to the screen on the left edge, but not on the right.
The media files are now flushed from edge to edge of the mobile screen in default view. I have included all three snippets of code that you have suggested in the thread. With this combination however, there are a few problems:
In desktop view, the width of the featured image is smaller than that of the white content area.
In desktop view, the paragraphs are not aligned with the images. They start to the left of the images.
I believe problems 1 and 2 are caused by .container.main-content-area { padding: 0; } but I’m not sure how to rectify it.
In mobile view, you can still swipe to the left. By doing so, you still see a white area in between the media file and the right edge of the screen. Is there a way to resize the page such that the width of the page fits nicely with the screen and you cannot swipe left/right?