Questions tagged [device-width]

57 questions
0
votes
2 answers

Mobile Emulator is picking the wrong stylesheet based on device width specified in media query...why?

This is my meta tag... I am using breakpoints as max-320 then max-480, when I'm testing my page from a device width of 320, it's working…
0
votes
2 answers

Can I use device-width in css to get width of the browser in css itself?

I have a doubt that, can I apply/use device-width to style a div instead of giving 100% for a div? I tried its working but not sure whether its good practice or not. ` .myDiv{ width:device-width; } instead. .myDiv{ …
Rajilesh Panoli
  • 770
  • 10
  • 17
0
votes
1 answer

Pixel ratios: are the "fake" pixel values on hi-res devices applied to all width properties, or only to selected ones?

I am doing some CSS for a web shop that lives entirely in the webview of a mobile app for Android and iOS. I'm using media queries to distinguish between phones and tablets. I've figured out a way to keep my rules simple: there's a "phone" layout…
Wytze
  • 7,844
  • 8
  • 49
  • 62
0
votes
1 answer

Media query for iPad with min-width also applies to Android devices

I'm editing other people's CSS. They've used two media queries for iPad (one for portrait, one for landscape) that seem to be causing problems on some larger Android phones and phablets. What I find so strang is that the CSS they have used is being…
Wytze
  • 7,844
  • 8
  • 49
  • 62
0
votes
2 answers

Why isn't bootstrap device-width using the entire width of my browser?

I'm trying to follow a Bootstrap tutorial but the first div I'm creating, that should be spanning the entire width of my browser/device, seems to be limited at ~1000 pixels. Any ideas as to why this is? Here's my code:
Tim
  • 741
  • 1
  • 10
  • 16
0
votes
1 answer

Can I set a viewport higher than 1024?

We are looking at an existing (non-responsive) site whose width is 1230 or so. So on mobile devices its content, even compressed as it is, loses about 10% off to the right. That's bad, as their phone number (plenty large enough to see, even…
hawbsl
  • 15,313
  • 25
  • 73
  • 114
0
votes
1 answer

how do i change the js slider effect to fade when my window width is less than 800px?

I'm looking for a way so that my js slider will change it's effect from (normal as it is now) to fade when my browser window is less than 800px. Can anybody help?
0
votes
3 answers

Why my responsive CSS is not taking media width?

As the title's saying, I can't set media screen width-specific CSS for my PHP webpage. Here is my section of my index.php:
Mayeenul Islam
  • 4,532
  • 5
  • 49
  • 102
-1
votes
2 answers

Wrong container size in mobile

I have problems using the meta tag width="device-width" because the page loads zoomed in on mobiles. After checking with the inspector I realized the site container has the "wrong" size on mobiles: even though in the CSS the width is set to 100%…
jpch
  • 1
  • 1
-1
votes
2 answers

Set two different viewports setting via CSS or Javascript

I'm trying to set two different viewport settings for different browser widths. The first viewport setting is for devices wider than 680px width (especially for iPad and desktop devices): The second viewport for devices under 680px width: I was…
Filip
  • 77
  • 2
  • 11
-1
votes
2 answers

How to set different meta tags acording to device width

Here I want to set the meta tag according to the device width, I'll explain my problem in more details: Now, I have a website that has a mobile version and full version, the mobile version will works on the mobile devices only that their width is…
LeoAref
  • 174
  • 1
  • 12
-3
votes
2 answers

Detect if browser window is maximized and at default (100%) zoom

I know it sounds weird but there really is a reason and it is in the users' best interest. I know that having the browser automatically maximize and set 100% might be problematic but how about making so that if the window is not maximized and the…
Mike Pala
  • 766
  • 1
  • 11
  • 39
1 2 3
4