some help please in html code?

  • Thread starter Thread starter gravedigger_a1
  • Start date Start date
G

gravedigger_a1

Guest
i ma using the html codes to add an image as background but every time i add image If the image is smaller than the page, the image will repeat itself i want a code to add image to fit the page size in spite off the image size; in other words i need to add small image and it become as the same as the page resolution
 
try attibutes in the background image tag: width=100% height=100%

it may distort it but you can't have it fill the screen and not be distorted.
 
use CSS for this in the head tags of your page post the following
<style>
body {
background-image: url(folder/image.jpg);
background-attachment:fixed;
background-repeat:no-repeat;
}
</style>
folder is where your file is located and image.jpg is your image name.
there is no good way to resize an image, and it is bad practice. You can pixelate the image when you resize it making it not a good image. Try resizing the image in Photoshop or other image editing software.
 
Background images can be set not to tile, but they cannot be scaled.

http://www.w3.org/TR/CSS21/colors.html#propdef-background-repeat
 
Back
Top