Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-17-2012, 01:26 PM   PM User | #1
MrTIMarshall
Regular Coder

 
Join Date: Nov 2010
Posts: 347
Thanks: 44
Thanked 1 Time in 1 Post
MrTIMarshall is an unknown quantity at this point
CSS Media Queries

Hello,

I have the Google Chrome extension to change my browsers screen side to anything I want with some already preset. One of which is titles "Not so old computers" which is 1280, however as you see in the CSS Media Query below, although it is set to this, it does not seem to work.

Code:
@media only screen and (min-width : 1280px) {
	/** MY css is here... **/
}
I tried editing the minimum width to -10px which had no effect then a further -10px (1260px instead of 1280px) and I finally got a result.

Any ideas about this?

Best Regards,
Tim

Last edited by MrTIMarshall; 11-17-2012 at 01:53 PM..
MrTIMarshall is offline   Reply With Quote
Old 11-17-2012, 04:03 PM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,613
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Does this extension calculate the browser chrome (window) or the viewport? Because these 20px are usually the space the scrollbar takes. Firefox’s web developer toolbar has an option to show window size in the title, and it shows the actual window size and then also the viewport size.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 11-17-2012, 08:36 PM   PM User | #3
MrTIMarshall
Regular Coder

 
Join Date: Nov 2010
Posts: 347
Thanks: 44
Thanked 1 Time in 1 Post
MrTIMarshall is an unknown quantity at this point
Quote:
Originally Posted by VIPStephan View Post
Does this extension calculate the browser chrome (window) or the viewport? Because these 20px are usually the space the scrollbar takes. Firefox’s web developer toolbar has an option to show window size in the title, and it shows the actual window size and then also the viewport size.
Window size: 1692 x 1024
Viewport size: 1523 x 828

I've never actually noticed this before as I need a x500 - x600 magnifications on to use my computer and it pops up at the bottom and I just checked.

I'll go and check the settings to see if I can fix this...
MrTIMarshall is offline   Reply With Quote
Old 11-17-2012, 08:40 PM   PM User | #4
MrTIMarshall
Regular Coder

 
Join Date: Nov 2010
Posts: 347
Thanks: 44
Thanked 1 Time in 1 Post
MrTIMarshall is an unknown quantity at this point
I chose to view the 320x480px and go these results;
Window size: 336 x 593
Viewport size: 290 x 436
Guess I'll need to find either a better extention or?...
MrTIMarshall is offline   Reply With Quote
Old 11-17-2012, 10:22 PM   PM User | #5
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,613
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Sounds like it. But you can also put some element with a certain width kind of as ruler into the page to see how the stylesheet changes with which size. For example put a div with a width a height of 10px and some background color so you actually see it, and then set a width on it in different media query rules, like:
Code:
@media only screen and (min-width : 860px) {
  #example {width: 860px;}
}
@media only screen and (min-width : 1280px) {
  #example {width: 1280px;}
}
You will then probably see it changing when the specific minimum width is reached.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:06 AM.


Advertisement
Log in to turn off these ads.