Images full width on tablet, smartphone

Posted in: Newspaper
Post count: 38

I’m trying to get the .size-full images to override the page padding, so they will touch the edges on tablet size and smartphone. I have achieved this for videos, but not for images. https://bingewhat.com/2018/03/22/the-best-romantic-comedies-1/
I can force a min-width 768px for tablet, and 320px for iPhone — but there are other sizes that it won’t work for. Example: http://mobiletest.me/google_nexus_7_emulator/?u=http://www.bingewhat.com
I’ve tried everything. Here’s the tablet example of the code I’m using…
.td-post-content p .size-full {min-width:768px;margin-left:-14px;margin-right:-14px;}

Post count: 22421

Hello,

You have this code in the them panel that prevents it. Try to change that to a 0 and the images will go to the edges of the screen.

Thanks.

Post count: 38

What did you mean by “this code”? This? .td-post-content p .size-full {min-width:768px;margin-left:-14px;margin-right:-14px;}
If so, I tried changing the margin to 0, but it didn’t work. ?

Post count: 22421

It seems the screenshot did not get through.
I meant this code: https://www.screencast.com/t/3JfSwwR5gvMj

Thank you!

Post count: 38

Thanks, but unfortunately, doing that makes the text go to the edge as well. Trying to make images and videos only go to the edge, with text having a 10px padding right and left.

Post count: 38

By using min-width:320px and min-width:768px, the images go to the right edge on those sizes. It’s the sizes in between 320 and 768 where I get a right margin or padding of 10px somehow.

Post count: 22421

Hello,
Css cannot be rewritten too many times. There comes a point where a custom css cannot rewrite the original code anymore. I cannot provide any code that will rewrite the css. You will have to remove it from your custom css and remove the padding from style.css:
https://www.screencast.com/t/4lotTy1k Once both these paddings are removed, the images go full width: https://www.screencast.com/t/xcJ767Mm9
The bar on the right is a scroll bar. That can be removed like so:

::-webkit-scrollbar {
display: none;
}

Thank you!

Post count: 38

If I remove the padding as you suggested, the text on the page will also be flush to the sides. So that won’t work. I’ll give it some more thought. Thanks.

Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic.