css media print check legal paper - css

How to check in if the height age is equal heigth paper Legal ?
My code didn't work
#media and (min-height: 13in) {
#media print{
#divbr{
display: block;
}
}
}

this is the solution :
#divbr{
display: none;
}
#media (min-height: 13in){
#media print{
#divbr{
display: block;
}
}
}

Related

I am unable to style a page using max-width media query

I am practicing to code. Trying to make the grubhub webpage. Having trouble with the max-width media query.
Below is my code
#media (max-width: 800px) {
div.displayFood h2 {
font-size: 3rem;
}
.order {
display: flex;
flex-direction: column-reverse;
}
}
I understood that it's a lot of codes. Appreciate any help.
You have a missed close bracket on class .hide
This is the reason why nothing works after this class
.hide {
display: none;
} /*<---- this is missing*/
#media (min-width: 800px) {
.hero {
flex-wrap: nowrap;
}
}
Media Query for device width < 800px would be#media only screen and (max-width: 800px) {...}

Changing Foundation's topbar breakpoint with custom CSS?

I'm trying to move from Bootstrap to Foundation, but I'm having an issue in trying to identify how to exactly change the breakpoint for the topbar in Foundation. I'm using a a CDN version of the minified CSS for Foundation, so I do NOT have access to the settings SASS file to modify this. Is there a quick CSS override workaround? So far my searches on here, and Google, haven't turned up a working solution.
Import another CSS file below the minified Foundation CSS that will target the topbar
<link rel="stylesheet" href="foundation-min.css">
<link rel="stylesheet" href="override.css">
So, for example, if .topbar has margin: 1px; override it on override.css by setting another margin: 2px; attribute there.
This post will help
https://stackoverflow.com/a/31511646/6294600
Have you checked this one https://zurb.com/university/lessons/change-foundation-s-default-breakpoints
EDIT: a hint here...
look for the .show-for-medium class... I hope you know what to do after that... Don't give up...
#media screen and (max-width: 39.9375em) {
.hide-for-small-only {
display: none !important; } }
#media screen and (max-width: 0em), screen and (min-width: 40em) {
.show-for-small-only {
display: none !important; } }
#media screen and (min-width: 40em) {
.hide-for-medium {
display: none !important; } }
#media screen and (max-width: 39.9375em) {
.show-for-medium {
display: none !important; } }
#media screen and (min-width: 40em) and (max-width: 63.9375em) {
.hide-for-medium-only {
display: none !important; } }
#media screen and (max-width: 39.9375em), screen and (min-width: 64em) {
.show-for-medium-only {
display: none !important; } }
#media screen and (min-width: 64em) {
.hide-for-large {
display: none !important; } }
#media screen and (max-width: 63.9375em) {
.show-for-large {
display: none !important; } }
#media screen and (min-width: 64em) and (max-width: 74.9375em) {
.hide-for-large-only {
display: none !important; } }
#media screen and (max-width: 63.9375em), screen and (min-width: 75em) {
.show-for-large-only {
display: none !important; } }
These parts can be found in
https://cdnjs.cloudflare.com/ajax/libs/foundation/6.2.3/foundation.css
Change the values, I hope this answers the question. Happy Coding...
LAST BIT OF INFO:
change the min-width size
#media screen and (min-width: 64em) {
.top-bar{
display:none;
}
}

Overwritting bootstrap hidden-xs media queries

I'm using the really useful bootstrap hidden-xs, visible-xs and so on classes to make a questionare page responsive.
One of my clients is embeding this page in his website and unfortunately, he can only support an iframe width of 700px.
So my problem is, that he gets the mobile version of the page in his website as the bootstrap xs starts at 767px.
So what can I do to change this behaviour to 650px?
My approach in my overwritting css is following but nothing changes:
#media (max-width: 650px) {
.visible-xs {
display: block !important;
}
table.visible-xs {
display: table !important;
}
tr.visible-xs {
display: table-row !important;
}
th.visible-xs,
td.visible-xs {
display: table-cell !important;
}
}
#media (max-width: 650px) {
.visible-xs-block {
display: block !important;
}
}
#media (max-width: 650px) {
.visible-xs-inline {
display: inline !important;
}
}
#media (max-width: 650px) {
.visible-xs-inline-block {
display: inline-block !important;
}
}
#media (max-width: 650px) {
.hidden-xs {
display: none !important;
}
}
So, I decided to create my own additional xxs class for that case. For everyone who runs into a similar issue here the css that needs to be added with your desired widths:
.visible-xxs,
.visible-xxs-block,
.visible-xxs-inline,
.visible-xxs-inline-block {
display: none !important;
}
#media (max-width: 600px) {
.visible-xxs {
display: block !important;
}
table.visible-xxs {
display: table !important;
}
tr.visible-xxs {
display: table-row !important;
}
th.visible-xxs,
td.visible-xxs {
display: table-cell !important;
}
}
#media (max-width: 600px) {
.visible-xxs-block {
display: block !important;
}
}
#media (max-width: 600px) {
.visible-xs-inline {
display: inline !important;
}
}
#media (max-width: 600px) {
.visible-xxs-inline-block {
display: inline-block !important;
}
}
#media (max-width: 600px) {
.visible-xs {
display: none !important;
}
}
#media (max-width: 601px) {
.hidden-xxs {
display: none !important;
}
}
#media (min-width: 601px) and (max-width: 766px) {
.visible-xs {
display: block !important;
}
table.visible-xs {
display: table !important;
}
tr.visible-xs {
display: table-row !important;
}
th.visible-xs,
td.visible-xs {
display: table-cell !important;
}
}
#media (min-width: 601px) and (max-width: 766px) {
.visible-xs-block {
display: block !important;
}
}
#media (min-width: 601px) and (max-width: 766px) {
.visible-xs-inline {
display: inline !important;
}
}
#media (min-width: 601px) and (max-width: 766px) {
.visible-xs-inline-block {
display: inline-block !important;
}
}

Media querys css - target large screens

So I am trying to make my website responsive, but when I target screens larger than 1600px the css is not working. Do I have any typo in my css code? Thank you.
#media (max-width:900px) and (min-width:600px) {
ul.news li {
width: 100%;
margin-top: 3px;
}
}
#media (max-width:1250px) and (min-width:900px) {
ul.news li {
width: 100%;
margin-top: 3px;
}
}
/* THIS ONE IS NOT WORKING */
#media only screen and (min-width: 1600px) and (max-width: 2600px) {
ul.news li {
width: 100%!important;
color: red!important;
}
}
You can refer to this Media Query and write your css in this media query dimensions
/*=====Media Query Css Start======*/
#media all and (max-width:1920px){
}
#media all and (max-width:1600px){
}
#media all and (max-width:1366px){
}
#media all and (max-width:1280px){
}
#media all and (max-width:1024px){
}
#media all and (max-width:960px){
}
#media screen and (max-width:767px){
}
#media screen and (max-width:480px){
}
/*=====Media Query Css End======*/

How the media query elements tag works in html

The content does not display properly. IS there anything wrong with the below #media query?
#media screen and (max-width:) and (orientation: portrait){
body{
background-color:;
}
h1 {
display:block;
}
h1 a{
font-size:2em;
display: block;
height: number;
}
}
For example there is no max-width and background-color values?
Also there is a number instead of value for height property
// add value or remove the rule, example:
// #media screen and (max-width: 1024px) and (orientation: portrait){
// #media screen and (orientation: portrait){
#media screen and (max-width: 1024px) and (orientation: portrait) {
body{
background-color: black;
}
h1 {
display:block;
}
h1 a{
font-size: 2em;
display: block;
height: 400px;
}
}

Resources