How to subtract background from an image?

How can insert an image as background in HTML page which can totally cover whole page?

  • i want to insert an image in my html as background. i can do it. but the problem is that, the image is automaticaly tiled. and thats why i get background full of various pieses of image. i want one image only in my background. means i want to stretch the image so i can fit it in the background instead of tiled it. is there any attributes or tag in HTML by which i can perform my work. let know me these attributes and tags if any or other ways to deal with the size of image as background in html pages.

  • Answer:

    that has been my problem eversince. but there are various languages nowadays that is far more advance than HTML. These are XML, and others.

LG at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

simple . use style sheet as follows . in this example bgdesert.jpg is the image used . <html> <head> <style type="text/css"> body { background-image: url('bgdesert.jpg'); } </style> </head> <body> </body> </html>

Ramesh B

Just resize your image 1024 * 768 pixels and try, Actually it depends upon the resolution you are using on your monitor, so dont worry about anything else, if you apply the above said resolution, it should fit in any monitor and it wont show as your previous issue was. Hope you will find the helpful.

Syed Irfanulla

I think you might need to resize the picture so that it fits the whole background of the webpage, or use another picture which is seamlessly tiled - e.g. lines - like on the sides of this webpage.

You can tile an image in the background to entirely cover the background no matter what size the browser window is. If the image in the background is already bigger than any possible browser window size can be and fixed (non scrolling). So make a very large picture, if the detail of the background image is not too important you can increase compression to make it smaller and there fore load faster. Good luck!

Rowdy answers

normally we use the body tag for this purpose the following way: <body background="url"> "url" here means the path of the image. Using inline styles, we can stop the tiling, the following way: <body style="background-image:URL; background-repeat:no-repeat;"> alternatively we can also control it using css or inline style to tile only either on x or y axis (use "repeat-x" or "repeat-y" instead of "no-repeat") or define positon (background-position:center;) of the background on the page. Though you will not be able to specify the width and height of the image. I suggest you use some image editing software like photoshop for this.

Caprisco

You might have to do it with css code. Css code is easier for styling a webpage anyway, because you can change things quicker and easier. It's all a matter of learning it. Put this in your coding at the top underneath the header. <style type="text/css"> body { background-image: url (insert url here); background-repeat: no-repeat; } </style> If this doesn't give the desired result, try this: insert the words repeat-y or repeat-x in place of no-repeat. If you want your picture to not move, then type background-attachment: fixed; into the coding above. To learn more about css, go to the links below. To see what CSS is capable of, go to the second link below. Be sure to pick another style from the list on the right. ^_^

WinterRhya

the above three answers seem to be right

Max

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.