How can I remove the padding on pages on mobile only [closed] - css

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
Hello I cannot figure out how to remove the borders on my website in mobile only. I have huge padding that do not look good in mobile.
An example page
https://www.onlinematching.games/jewels-blitz/

Using CSS media queries.
You can control design for different devices using media queries.
Reference:- https://www.w3schools.com/css/css_rwd_mediaqueries.asp

as I checked your site all you have to do is change the width attribute of .container, .container-1400 in your style. there are more than one place to be changed(for every media queries).
codes below are for example:
#media only screen and (max-width: 767px) and (min-width: 480px){
.container, .container-1400{ width : 99%;/* 1% for margin */}
}

Related

Why don't my grid columns layout correctly in Firefox? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
so on this website http://kimandydev.com/
the spacing is weird on only the 4th row.
Everything is gridded out perfectly on Chrome and Safari, but on in Firefox.
I used Advanced Custom Fields to feed the content just FYI.
Can someone inspect it on firefox and somehow figure out what is causing it?
Thank you
The problem is that some of your images aren't the same aspect ratio, and Firefox considers the partial-pixel height difference when it lays out the floats, so they don't clear.
Be sure that all your images are exactly 1000x1500.
You could also force image sizes at each breakpoint using media queries:
#media (min-width: 940px) { /* or whatever it is */
.front-img {
height: 330px;
}
}

Mobile page being cut off at the top [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I created and hosted a Jekyll website on github-pages using the HTML5 UP Alpha Theme found on "html5up.net/alpha"
For some reason, pages are being cut off at the top on mobile only. I've gone through the mobile css but I have been unable to locate any issues.
The site mobile css can be viewed here:
http://pastebin.com/jwNwpXyF
And a screenshot of the problem can be seen here:
http://imgur.com/ZPycfNH
Your background image of banner is getting smaller for mob device to maintain the ratio, because of which the #main is cutting from top as it has margin-top:-26em for desktop, the same applies on mob too.
To fix it you have to change the margin for mob devices. Try below css.
#media (max-width: 640px) {
body #main {
margin-top: -8em;
}
}

What is the most efficient way to have background images of different sizes in a responsive design website? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am building a responsive website. This website needs a lot of background images (both vector and raster formats).
I want to optimize the website for loading speed but not decrease picture quality.
My understanding is that I should have different versions for the same picture so that for small window devices the user automatically downloads the correct smallest file size.
My question is: What is the best way to deal with this problem? Do I need to use media queries? how to use them such that different browsers actually don't download unnecessary data?
Well, another post here on SO discussed if an unused css image url(''); is downloaded by the browser even if no element matches the rule. And it's been tested and established that on all major browsers, the images won't be downloaded unless an element actually matches the selector.
Post: Are unused CSS images downloaded?
It means that, if you define media queries for your styles, only the images inside rules that match the specific viewport will be downloaded.
In the following example, if you're in a device which is 480px wide or less, don't worry because large.jpg won't be downloaded.
#media (max-width: 480px) {
#myDiv {
background-image: url('small.jpg');
}
}
#media (min-width: 481px) {
#myDiv {
background-image: url('large.jpg');
}
}
Just reminding that this is a behavior left up to the browsers, so they can change anytime they want.

Div not showing up in responsive layout [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I have a responsive wordpress website which shows nicely on desktops. But somehow the whole layout is broken on smaller screens and the products div on homepage doesn't even display up there. .featured_products is the ul which you see on home page but it disappears as soon you resize your browser to smaller mobile size.
Here is my website.
It is because of a media queries in your stylesheet which starts at line 5811 in style.css
#media only screen and (max-width: 479px)
And then this part in the media query which starts at line 6149 in style.css
#subcontent2 {
display: none;
}
please change the code
#subcontent2{
display:none;
}
and also check this jsfiidle for your solution
http://jsfiddle.net/wpEwZ/

Fluid Design on Mobile Device [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am attempting to code a "semi-fluid" item for a mobile site and need a bit of help.
What I am looking to do is realign the layout when viewed vertical or horizontal.
When viewed vertically it should be...
Horizontal should be...
While it is a fairly rudimentary example, You can simply float the elements left when the screen is above a certain size. This is accomplished using a media query. You can assign media queries in CSS3 and can find the documentation here.
#media (max-width: 600px) {
#green, #red {
float: none;
}
}
Here is the jsFiddle for the simple solution.

Resources