1) It's impossible to make a background image a link with CSS.
2) That's not what CSS is for.
------------
However, you could make an invisible block with CSS and wrap it in an HTML anchor.
CSS Example:.invisibleblock {
/*make it invisible*/
-moz-opacity:0; filter:alpha(opacity=0); opacity:0;
/*fill the container its in (change this to px if you have a specific size)*/
width:100%;height:100%;
/*z-index, for ensuring its behind everything else*/
z-index:1;
/*Extra bits in case it's not working properly*/
display:block;border:0;margin:0;padding:0;
}
You could alternatively give this block the background image and make it visible, but this doesn't work well with a body background.
In the HTML, use an 'a' tag pointing to the page you need on that image, eg.
Note:You will have to use z-index for everything that will be in front of that invisible block for it to work correctly. It will need an index greater than 1, with the highest index being in front of everything else.If this was on the body background, then you could add
Current CSS does not allow resizing a background image. Hopefully, CSS 3.0 will address that issue.
A css background image is another name for a computer wallpaper.They can be found on Photobucket, SantaBanta Wallpaper, Deviant Art and Free Wallpapers.
To post a picture using CSS, you typically use the background-image property. Here’s an example: css .image-container { width: 300px; /* set width */ height: 200px; /* set height */ background-image: url('your-image.jpg'); /* specify image URL */ background-size: cover; /* ensure the image covers the container */ background-position: center; /* center the image */ background-repeat: no-repeat; /* avoid repetition */ } In HTML: html Copy code This CSS code sets a background image for a container and ensures it's centered, scaled, and non-repeating.
To make a picture a background of a web site using CSS, you will use the different background properties, which are: background-color, background-image, background-repeat, background-attachment, and background-position. The specific property you are looking for is background-image. To use this property you would declare in your style sheet the following: body { background-image: url('paper.jpg'); } This is telling the web browser to use the image paper.jpg and make it the background of the entire page. The other background properties control whether the backgound is repeated along the x and/or y axis, the position on the screen the image begins at, whether the background is fixed or scrolls with the page, and the background color.
CSS maps can be turned into "Image" maps (Applying a texture) by setting a "background-image" property, or using the <img> tag.
In most browsers the background image will be shown. If the image has been configured so as not to repeat, and the element is larger than the background image then the area that is not covered by the background image will display the background color. DJL
You will need to use the url() function. For example: background-image: url('/images/bg.png');
Use the "style" attribute in the "body" tag to set inline styles. Set the "background-image" and "background-repeat"CSS attributes to the body element. "background-image" should have a path to the image you want as a background, and "background-repeat" should have "repeat," indicating you want the image to tile both horizontally and vertically. For example (replace path-to-image.jpg with a relative or absolute path to the background image of your choice): ---- ... ----
The main background image is style using the body tag. The other that appears "raised" in a container div or table. The body background image can be set to allow the contents to scroll over it or not. Background Image Code: For the body tag example: body { width: XXpx; height: YYpx; margin: 0 auto; background: #fff url(image_name.jpg) no-repeat center scroll; } That is the proper CSS code for a non-tile image where the contents scroll with the background image. Change "#fff" to preferred bg color. Change "scroll" to "fixed" if you want page contents to scroll over bg image. Be sure to set proper width/height to provide minimum page size to display bg image. Put the CSS as is on an external CSS file. If using embedded CSS, then place CSS between the style tags and place those style tags between the head tags of the page.
Use html only and that should give you a static page. You can put image as background by using css
Background Image Code: For the body tag example: body { width: XXpx; height: YYpx; margin: 0 auto; background: #fff url(image_name.jpg) no-repeat center scroll; } That is the proper CSS code for a non-tile image where the contents scroll with the background image. Change "#fff" to preferred bg color. Change "scroll" to "fixed" if you want page contents to scroll over bg image. Be sure to set proper width/height to provide minimum page size to display bg image. Put the CSS as is on an external CSS file. If using embedded CSS, then place CSS between the style tags and place those style tags between the head tags of the page.
Depends on how you are able to edit the code. This is the basic CSS way for a web page: Background Image Code: For the body tag example: body { width: XXpx; height: YYpx; margin: 0 auto; background: #fff url(image_name.jpg) no-repeat center scroll; } That is the proper CSS code for a non-tile image where the contents scroll with the background image. Change "#fff" to preferred bg color. Change "scroll" to "fixed" if you want page contents to scroll over bg image. Be sure to set proper width/height to provide minimum page size to display bg image. Put the CSS as is on an external CSS file. If using embedded CSS, then place CSS between the style tags and place those style tags between the head tags of the page.