I do not want any white space at the margins at small devices. When the screen is already small it is counterproductive to use anything but the full width of the screen.
So I am using a theme through wordpress, but I figured out the container div and was able to modify it, I wanted to make it narrower. I also declared a div (child1wide) that would be wider than the container (that has the width of 65%), hoping the marings would dissapear.
The problem is that there are margins, that is white space, on the sides of the text on small screens. How can I get rid of this white space? I still want to have marrgins on bigger screens.
You can see how it looks today: https://imgur.com/dcVIGBJ
The un-modified .container has acceptable margins, but I want to make it work for .child1wide and maybe learn something new.
CSS (observe, the .container is probably also defined within my wordpress theme, this is only me additional "Custom CSS"):
.child1wide {
background-color: yellow;
display: flex;
margin-left: calc(-37.5vw + 50%);
width: 75vw;
}
.container {
width: 65% ;
padding: 0px 0px 0px 0px;
}
HTML (the second "Lorem ipsum"-text is outside the .child1wide-div, meaning it is automaticly in the .container-div set by wordpress theme):
<div class="child1wide">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolore neque repellat ipsum natus magni soluta explicabo architecto, molestias laboriosam rerum. Tempore eos labore temporibus alias necessitatibus illum enim, est harum perspiciatis, sit, totam earum corrupti placeat architecto aut minus dignissimos mollitia asperiores sint ea.
</div>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolore neque repellat ipsum natus magni soluta explicabo architecto, molestias laboriosam rerum. Tempore eos labore temporibus alias necessitatibus illum enim, est harum perspiciatis, sit, totam earum corrupti placeat architecto aut minus dignissimos mollitia asperiores sint ea.
I know about the @media only screen and but can not make it work.