Media Queries fix issue - css

I made some simple media queries and load in website but when I refresh the page so because of media queries css website orignal css also disturbing, please suggest the exact and proper solution how I fix the media queries as per mobile widths and also including way of these queries in website so I can make a proper responsive website.
For more suggestion I share css code
/* Smartphones (portrait) ----------- */
#media only screen and (max-width : 480px)
body {
background-color:white;
}
#columnout {
background:none;
background-color:#0090d7;
width: 300px;
height: 200px;
margin-top: 210px;
position:absolute;
z-index:100;
}
#column{
width: auto;
height: auto;
text-align: right;
margin-left: 47px;
z-index: 1;
margin-top: -29px;
}

You are missing the brackets: {}
#media only screen and (max-width : 480px) {
body {
background-color:white;
}
#columnout {
background:none;
background-color:#0090d7;
width: 300px;
height: 200px;
margin-top: 210px;
position:absolute;
z-index:100;
}
#column{
width: auto;
height: auto;
text-align: right;
margin-left: 47px;
z-index: 1;
margin-top: -29px;
}
}
Some reference for testing how responsive your design is: http://creatiface.com/tools/responsive-design-test

Add {} in your media query:
#media only screen and (max-width : 480px){
body {
background-color:white;
}
#columnout {
background:none;
background-color:#0090d7;
width: 300px;
height: 200px;
margin-top: 210px;
position:absolute;
z-index:100;
}
#column{
width: auto;
height: auto;
text-align: right;
margin-left: 47px;
z-index: 1;
margin-top: -29px;
}
}
For more details please see this link: http://mobile.smashingmagazine.com/2010/07/19/how-to-use-css3-media-queries-to-create-a-mobile-version-of-your-website/

Related

How to change css according to the size of the display

Im so new in CSS and trying to fix the following code..
I want a simple thing where the screen size is smaller than 400 change the image size..
it should work but it doesn't..
I tried to make
* {
box-sizing: border-box;
}
body, html {
background: #fff;
height: 100%;
margin: 10px;
}
.left__img2 {
position: absolute;
float: left;
display: block;
margin-left: auto;
margin-right: auto;
width: 50%;
border-radius: 20px;
width: 600px;
height: 400px;
}
#media screen and (max-width: 500px) {
.left__img2 {
width: 10px;
}
}
Media queries at the top of the CSS need !important to over rule the media query. Media queries at the bottom do not need !important. I placed the query at the top so I used !important to over rule any other style after.
#media screen and (max-width: 500px) {
.left__img2 {
width: 10px !important;
}
}
* {
box-sizing: border-box;
}
body, html {
background: #fff;
height: 100%;
margin: 10px;
}
.left__img2 {
position: absolute;
float: left;
display: block;
margin-left: auto;
margin-right: auto;
width: 50%;
border-radius: 20px;
width: 600px;
height: 400px;
}
I think this will work.
#media screen and (max-width: 500px) {
.left__img2 {
max-width: 10px;
}
}
Your code works well in the following example (resize your window), maybe it comes from a side effect of the rest of your code, can you show us the rest of your code?
.left__img2 {
position: absolute;
float: left;
display: block;
margin-left: auto;
margin-right: auto;
width: 50%;
border-radius: 20px;
width: 600px;
height: 400px;
background-color: red;
}
#media screen and (max-width: 500px) {
.left__img2 {
width: 10px;
background-color: yellow;
}
<div class="left__img2"><div>

IDX Broker Responsive Results Page

I am having a hard time making the results boxes on this page responsive:
http://search.epicmountainhomes.com/i/deer-valley-real-estate
Does anyone know how to edit it using IDX broker or custom CSS?
Thank you very much!
Ok I figured it out:
/*Set Mobile Responsiveness One*/
#media only screen and (max-width: 500px) {
.IDX-resultsCell {
padding-bottom: 22px !important;
border-bottom: 1px solid #e5eeed !important;
clear: left!important;
width: 100%!important;
}
}
/*Set Mobile Responsiveness Two*/
#media only screen and (max-width: 500px) {
.IDX-grid .IDX-resultsPhotoImg {
height: 155%!important;
width: 100%!important;
clear: left!important;
left: 0!important;
position: absolute!important;
top: auto!important;
z-index: 0!important;
max-height: none;
max-width: none;
min-height: none;
min-width: none;
}
}

Custom Container Not Full Width

please take a look at my sample code
HTML
<div class="custom-container">
<section class="parallax-bg-1 text-center" style="background-image:url('https://killtheboredomdotcom.files.wordpress.com/2015/08/skyline-of-rome.jpg?w=1920&h=768&crop=1')">
<h1 class="">Welcome</h1>
<p class="lead">subtitle</p>
</section>
</div>
CSS
.custom-container{
padding-right: 0;
padding-left: 0;
width: 100%,
}
section {
height:350px;
padding-top:50px;
padding-bottom:50px;
}
.parallax-bg-1 {
background: no-repeat top center fixed;
color:#fff;
background-size:cover;
}
containers
}
.custom-container{
padding-right: 0;
padding-left: 0;
width: 100%,
}
.container {
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}
#media (min-width: 1600px) {
.container {
max-width: 1600px;
}
}
#media (min-width: 1900px) {
.container {
max-width: 1900px;
}
}
#media (min-width: 768px) {
.container {
width: 750px;
}
}
#media (min-width: 992px) {
.container {
width: 970px;
}
}
#media (min-width: 1200px) {
.container {
width: 1180px;
}
}
.container-fluid {
padding-right: 15px;
padding-left: 15px;
width: 100%;
margin-right: auto;
margin-left: auto;
}
JS Fiddle: https://jsfiddle.net/unpvuzaq/ (it works just fine in JS Fiddle but on my end it's not)
the picture is in parallax mode but take a look at my web screenshot it still has padding
image resolution 1920x1080
kindly help me.
add CSS outer div container,
.container.body-content{
width: 100%;
padding: 0;
margin: 0;
}
i think image may smaller than your screen size...you should give image as stretch...
add style to section class:
background-size: cover;
.custom-container{
padding-right: 0;
padding-left: 0;
width: 100%;
}
section {
height:350px;
padding-top:50px;
padding-bottom:50px;
}
.parallax-bg-1 {
background: no-repeat top center fixed;
color:#fff;
background-size:100%;
}
background-size: 100%; is working on 4K resolution display. (tested)

Photospace Gallerific wordpress responsive vertical gallery thumbnails media queries javascript css?

I'd like to make my gallery http://wordpress.org/extend/plugins/photospace-responsive/ be responsive with a vertical layout changing into a horizontal one when the browser is scaled down for mobile.
Please can you tell me how I can make it revert when the screen size is smaller to the gallery being on top?
See my test page
http://brightmist.co.uk/gallery/
I've even tried media queries
.photospace_res .gal_content {
float: left;
width: 80%;
}
.photospace_res .thumbs_wrap2 {
float: left;
min-height: 800px;
width: 20%;
}
#media all and (max-device-width: 480px) {
.photospace_res .gal_content {
float: none;
width: 100%;
}
.photospace_res .thumbs_wrap2 {
float: none;
min-height: 0;
width: 100%;
}
}
Thanks for your help
Judi
Yay I fixed it and added a few extra styles
.photospace_res .gal_content {
float: left;
width: 80%;
}
.photospace_res .thumbs_wrap2 {
float: left;
width: 20%;
}
.photospace_res {
margin: 0;
}
.photospace_res .ss-controls {
border: 1px solid #CCCCCC;
margin-bottom: 20px;
padding: 5px 10px;
}
#media screen and (max-width: 700px) {
.photospace_res .gal_content {
float: none;
width: 100%;
}
.photospace_res .thumbs_wrap2 {
float: none;
min-height: 0;
width: 100%;
}
}

Mediaqueries wont work? Responsive web

I'm currently trying to create a website with different media queries for different device sizes, the problem is, when I add a media query in the media-queries.css file for a different viewport the browser only reads one.
I recently added a media query for a maximum width of 1500 pixels, but now the media query for max-980px wont work.
Here's the css, anyone that can help me?
/************************************************************************************
smaller than 980
*************************************************************************************/
#media screen and (max-width: 980px) {
.slider-container {
width: 100%;
height: 100px;
background-color: white;
overflow: hidden;
-moz-border-radius: 20px;
border-radius: 20px;
}
.wrapper .slider-container #slideshow {
position: relative;
width: 100%;
height: 300px;
}
.wrapper .slider-container #slideshow > div {
position: absolute;
}
.wrapper .slider-container #slideshow > div img {
border: 20px solid #00e800;
height: 100%;
}
}
/************************************************************************************
smaller than 1500
*************************************************************************************/
#media screen and (max-width: 1500px) {
.slider-container {
width: 100%;
height: 400px;
background-color: white;
overflow: hidden;
-moz-border-radius: 20px;
border-radius: 20px;
}
.wrapper .slider-container #slideshow {
position: relative;
width: 100%;
height: 400px;
}
.wrapper .slider-container #slideshow > div {
position: absolute;
}
.wrapper .slider-container #slideshow > div img {
border: 15px solid #f3f70a;
height: 100%;
}
}
Add a min-width component to the larger max-width:
#media screen and (min-width:981px) and (max-width: 1500px) {
This should tell the system to segregate the two choices, as < 980 will also always be < 1500.

Resources