Hey,
So I am trying to make my portfolio website responsive for different screen resolutions. I am using media queries but they are not over-riding the native styles. I believe my syntax is correct but I will share it with you guys to see if I have done anything wrong.
[code=html]<link href=”css/responsiveIndex.css” rel=”stylesheet” type=”text/css”/>
This links to my stylesheet.
I am currently testing for a with a resolution of 1680 x 1050 which has the following media query
[code=html]@media only screen
and (min-width : 1680px) {
.cont_1_text {
font:Helvetica, Sans-serif;
font-size: 120px;
color: #ffffff;
}
.cont_1_text2 {
font: Helvetica, Sans-serif;
font-size: 50px;
color: #ffffff;
}
}
All it needs is for the text to be scaled down a bit.
Thanks in advance to who ever can help me fix this issue.
1680 is not 1680 friendly -- the width used for calculation there is the available space inside the browser -- so you have to account for browser "chrome" like the window frame and the scrollbar, as well as anything else in the way.
Though you're non-condensed properties, changing font-size without resetting the line-height, massive px metric font sizes and lack of a MEDIA attribute on your CSS link [i](which done right would likely mean NOT having to say "screen only" in your media query)[/i] all raise a number of warning flags about your design.
Much less the vague classes that don't really say what the elements ARE.[/QUOTE]
So you suggest? It worked perfectly well until I moved the file containing the queries into a new folder in my directory...[/QUOTE]
Here's a good site to convert from pixels to ems :http://pxtoem.com/ [/QUOTE]
The idea of responsive design is to accommodate device widths down to, say, 320px wide. And generally with a number of cut-off widths on the way. How is one media query set at 1620px going to achieve that?[/QUOTE]
Cut off widths meaning? I am very new to responsive design.[/QUOTE]
<i>
</i>@media (min-width: 800px) {
/* settings for windows 800px and wider */
}
@media (max-width:799px) {
/* settings for windows 640px to 799px */
}
@media (max-width:639px) {
/* settings here for windows up to 639px */
}
@media (max-device-width:639px) {
/* settings here for SCREENS up to 639px */
)
<meta
name="viewport"
content="width=device-width; height=device-height; initial-scale=1.0"
/>
device-width
Value: <length>
Media: visual, tactile
Accepts min/max prefixes: yes
Describes the width of the output device (meaning the entire screen or page, rather than just the rendering area, such as the document window).
[/quote]
<i>
</i>@media (max-width:800px) {
/* do A */
}
@media (max-width:640px) {
/* do B */
}
@media (max-device-width:640px) {
/* do C */
}
I'm more interested in segregating the small-screen devices, which may need a simplified display, from normal PCs and large-screen devices. The above code achieves that.[/QUOTE]
Never let lawyers, marketers or artists create specifications... that's an Engineer's job... and never let an engineer implement it; that's what people with ACTUAL experience are for.[/QUOTE]
Simply add this code, this code will enable responsive on all devices. <meta name="viewport" content="width=device-width, initial-scale=1">[/QUOTE]
0.1.9 — BETA 5.18