WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You

You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Getting an image to fit any resolution on Mon Jun 07, 2010 8:01 am

Fatal Dawn

Registered Member
Registered Member
I have a question as to how you get an image to fit on any computer resolution. In the header of my forum, the logo bg looks good at the standard resolution - PC etc. But when I go to the laptop or another computer where the screen properties are little bit larger, the logo doesn't stretch the full background. Shocked

I don't if you understand my question, but I need to know how I can get that one image to fit on all screen resolution. I tried centering it, etc.

2 Re: Getting an image to fit any resolution on Mon Jun 07, 2010 10:35 am


Topic moved to coding section

If you want to fit an image in all resolutions, you can set its width using percentage like this..

<img src="image url" width="100%" />

This method is not proper since it may reduce the quality of the image.

If you want a background image to stretch, you can use background-repeat like this..

body {
background-image : url(image url);
background-repeat : repeat-x/repeat-y/repeat;

3 Re: Getting an image to fit any resolution on Thu Jul 18, 2013 3:02 pm


Registered Member
Registered Member
don't  stretch images vb.net by set the width, it may lose the quality. the image will never fit on screen.

4 Re: Getting an image to fit any resolution on Sat Jul 20, 2013 3:09 pm


Registered Member
Registered Member
If you wana that your image show same to all type computer and laptop. So you can set Height 100% and Width 100% , Its works same everywhere.

Sponsored content

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum