FAQ Database Discussion Community


How to resize image according from screen resolution on html css

html,css,image,screen-resolution
I want to change an image so that its size is according to the screen resolution, for example 1920x1080 to 1600x900, using HTML and CSS. How can I do it?...

How to get mouse position in the same place with different resolutions

java,coordinates,screen-resolution,java-2d,mouselistener
I developed a Monopoly Clone game (Bolivian monopoly) for the university. I put the monopoly board into Jpanel and try to get the mouse position in the exactly coordinate using e.getX() into the mouse listener event. the problem is that my game supports a loot of resolution 800x600, 1024x768, 1680x1050...

Getting the recommended resolution for computer in Code

c#,screen-resolution
Ok, I know there are similar threads about this issue, but none of them really fit my case: If I go to my desktop, click on screen resolution, I have a menu with a recommended resolution. I want to get this from code (C#). My Code looks like this: public...

bootstrap carousel not working in low resolution

css,twitter-bootstrap,screen-resolution
My Carousel is not working in low screen-resolution. If you zoom in the carousel will stop working and also the button beneath it. See: http://www.terbruggenantiek.nl/?page=details&id=32 I cant find a solution for this problem. many thanks!...

Getting incorrect screen resolution for IPAD Air

ios,objective-c,ipad,screen-resolution
I have written code to get the screen resolution like this. CGRect screenRect = [[UIScreen mainScreen] bounds]; CGFloat screenWidth = screenRect.size.width; CGFloat screenHeight = screenRect.size.height; The result of IPAD Air is like this for above code. screenWidth is ------->>> 1024.000000 screenHeight is ------->>> 768.000000 But the actual size is this...

automatic layout adjustment to varying browser window size

flex,layout,rows,mxml,screen-resolution
In Flex4/mxml, I have a bunch of elements like TextFields, Buttons or anything else. I want to place them horizontally next to each other. But for cases where the browser window or screen resolution is too small such that not all of them fit horizontally, I want a layout which...

Low resolution in MacVim. Bug?

osx,vim,screen-resolution,macvim
MacVim is on the left, and to the right is Terminal.app running vim. MacVim's app is clearly rendered in a different, lower resolution. Is there a way to fix this? Zooming In ...

Adapt scrollTop to work with different resolutions

javascript,jquery,screen-resolution
This is what I use to make 2 divs "unwrap" while scrolling: CSS .entry { height: 40px; } .entry.expanded { height:600px; } JavaScript $($('.entry').get(0)).addClass('expanded'); $(window).on('scroll', function (e) { var x = $(window).scrollTop(); if (x > 820) { $($('.entry').get(1)).addClass('expanded'); } if (x > 1525) { $($('.entry').get(2)).addClass('expanded'); } }); It works perfectly...

Android App - Designing for HTC Nexus 9 Screen Resolution

android,design,tablet,screen-resolution
I've designed my app for mobile phone devices, but the sizes and resolutions of many of my images look horrible while displaying on an HTC Nexus 9 tablet. What is the required width (in pixels) for my images so that they fill the screen properly (assuming the image is filling...

Adapting my website to different reslutions

css,resolution,screen-resolution
I have been working on this website and it is almost over.. until I discovered my computer is on a high resolution (1920 x 1080px). I tested my website in 1024x768px and it was... not what I expected. Anyway I searched far and wide around the web and there are...

Find position of mouse relative to control, rather than screen

vb.net,winforms,screen-resolution,windows-controls
I have a Picture Box called BGImage. I hope that when the user clicks on this I can capture the position of the mouse relative to BGImage. I've tried using MousePosition, only to find it gives the mouse location on the screen, not on the PictureBox. So I also tried...

Throwing OutOfMemoryError with large images

android,bitmap,out-of-memory,screen-resolution
I'm working on a way to hold the same aspect of my images (icons and images) in my "universal" app. The problem with the resolutions/screens densities is causing me a lot of headaches. Is there any way to work with this problem:? Device: Tablet 10" / 1280x752 / Screen density...

Video mode in OGRE Engine Rendering Setup

screen-resolution,ogre
I'm trying out OGRE and I'd like to ask a question about the OGRE config dialog. The dialog which can be opened with Ogre::Root::showConfigDialog(), lists only "800 x 600 @ 32-bit colour" for Video Mode, both for "Direct3D9 Rendering Subsystem" and "Direct3D11 Rendering Subsystem". My question is, why is there...

Android: distinguish between device resolutions when providing resources

android,xml,screen-resolution
I have and android project providing different dimens.xml for different screen resoultions. I am doing so by defining values-swXXXdp folders in my /res folder. However, I am now having trouble distinguishing the following two screen resolutions: 768x1280, 160dpi from 768x1024, 160dpi What I tried so far: values-sw768dp is used for...