473,386 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Resolution problem

129 100+
Hai friends,
I have a big problem, that is i have a image with 1024x640 resolution, but when it came to small or big resolution systems, the image is not setting fit some space is coming rightside and bottom. How to fit a small resolution image to any resolution systems?

One another doubt is if i have highest resolution image, how to fit that to small resolution systems without scrolling.

Please help me friends, it is urgent...............
Feb 15 '09 #1
4 1903
hsriat
1,654 Expert 1GB
I think you are trying to set the image as a background and you want it to stretch according to the screen size.
Add this to your code:
Expand|Select|Wrap|Line Numbers
  1. <div 
  2.     style="
  3.         position:absolute;
  4.         z-index:-1;
  5.         height: 100%;
  6.         width:100%;
  7.         top: 0px;
  8.         left: 0px;
  9.         bottom: 0px;
  10.         right: 0px;"
  11. ><img
  12.     src="your_image.png"
  13.     alt=""
  14.     style="
  15.         height: 100%;
  16.         width: 100%;"
  17. /></div>
Feb 15 '09 #2
sasimca007
129 100+
Thanks my friend, but i want to set the image as body background then how to do it?
Feb 15 '09 #3
hsriat
1,654 Expert 1GB
This is the only way you can stretch the image in the background. z-index: -1 and position: absolute are configured in order to give it a background like appearance.
Feb 16 '09 #4
sasimca007
129 100+
Thanks my friend,
It is working, many many thanks
Feb 16 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Erik Bethke | last post by:
Hello All, I am trying to clean up some polish bugs with the Shanghai game I am working on and I am currently stuck on trying to get the right event for detecting when the user has changed the...
1
by: Erik Bethke | last post by:
Hello All, I am trying to clean up some polish bugs with the Shanghai game I am working on and I am currently stuck on trying to get the right event for detecting when the user has changed the...
12
by: techie | last post by:
Hi All, I have a portal working on an intranet for a company. The portal was designed keeping in mind the resolution of 1024*768. I am including a ..css file in all the files. Now i have to make...
19
by: mehdi.louizi | last post by:
Hello, I'm beginning to create a web site but I'm facing a big problem for which I didn't find any solution!! I'm using the 1024*768 screen resolution, and when I change it to 800*600 the page is...
5
by: jlombardo | last post by:
I've read previous posts and know it is "bad form" to change a user's screen resolution to fit your program's needs. My situation is very different. I have a user with a laptop resolution of...
7
by: Robert Bull | last post by:
I have created an asp.net app on my machine where the resolution is set to 1280 x 1024. When my users view the form on their screen, some of the controls display differently than on my screen. One...
7
by: tim | last post by:
can someone tell me which function returns the screen resolution in java script?
5
by: Maxi | last post by:
I have a 30X16 cells table in my html page. Table height and width are set to 100%. I have set size of every cell inside the table to 24 pixel. When I open the html page in maximize state in...
8
by: digitalorganics | last post by:
What are the reason one would get this error: TypeError: Cannot create a consistent method resolution order (MRO) for bases object ?? I can provide the code if needed....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.