What is it about desktop.css that woud prevent it from being read by and applied to other devices?
/* Desktop */
@import url("desktop.css");
/* Phone */
@import url("phone.css") only screen and (min-width:321px) and (max-width:480px);
/* Phone */
@import url("iphone.css") only screen and (min-width:0px) and (max-width:320px);
/* Tablet */
@import url("tablet.css") only screen and (min-width:481px) and (max-width:768px);
Hi, well there should be nothing about desktop.css that applies to the other devices. But the div and image within the div are hidden. I must have mis coded something but I’m not having luck figuring it out. Thanks))
desktop.css is read and applied to devices of all widths.
desktop.css
.taptocall {display: none;}
is not overriden in the other .css files.
I have not tested this, but try changing
@import url("desktop.css");
to
@import url("desktop.css") only screen and (min-width:769px);
and see what happens.
…It is probable that other things will “break” but just see what happens to the button.
A more practical logic for laying out a page is to focus on a fluid layout and apply CSS breakpoints where needed by the design rather than try to target specific devices.
eg.
onefile.css
css styles for all widths first
@media screen and (max-width:800px) {
css styles for smaller widths
}
@media screen and (max-width:500px) {
css styles for smallest widths
}
The breakpoints are determined by the layout, not by a particular device.
This is a “desktop first” arrangement. One can also use a “mobile first” arrangement. Coder’s choice.
At this time, your web page could use some fluid TLC to eliminate the persistent horizontal scrollbars.