Print Page | Close Window

Background Picture

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Web Design Discussion
Forum Description: Discussion on web design and development subjects.
URL: https://forums.webwiz.net/forum_posts.asp?TID=15495
Printed Date: 29 March 2026 at 12:41pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Background Picture
Posted By: Misty
Subject: Background Picture
Date Posted: 17 June 2005 at 1:09pm

I am experimenting with a picture as the background at http://www.elizabethcountrykennels.com/samplebackground.htm - http://www.elizabethcountrykennels.com/samplebackground.htm . I am not happy with the way it is being displayed. How do I get only one picture to show? I don't want to change the size of the picture.




Replies:
Posted By: Mart
Date Posted: 17 June 2005 at 1:26pm
in the body tag just add:

style="background-repeat: no-repeat"


Posted By: Misty
Date Posted: 17 June 2005 at 1:45pm
Only one picture is showing. However, it's not covering the whole page. How do I get this picture to be displayed on the whole page?


Posted By: Gullanian
Date Posted: 17 June 2005 at 2:08pm
Style property width = 100%?


Posted By: dpyers
Date Posted: 17 June 2005 at 2:24pm
Won't work that way. Background images have no size attributes that you can use to stretch them.

The only way I know of to do it would be to create a div with a z-order of -1 (or anything lower than any other z-order on the page) and put the image in that div via the image tag.
You'd then use javascript to detect the size of the viewport and adjust the height and width in the image tag to match.


-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Mart
Date Posted: 17 June 2005 at 3:49pm
can't you just set the width and height of the div and the image to 100% instead of using a js?


Posted By: dpyers
Date Posted: 17 June 2005 at 5:14pm
Yoiur right. This works in IE and FF
Quote
<div width="100%" height="100%">
    <p align="center"><img border="0" src="backimage.bmp" width="100%" height="100%"></p>
</div>


Does get a little distorted depending upon how you resize the browser though, but with the right image it would do ok.


-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Misty
Date Posted: 18 June 2005 at 1:59am
Originally posted by dpyers dpyers wrote:

Yoiur right. This works in IE and FF
Quote
<div width="100%" height="100%">
    <p align="center"><img border="0" src="backimage.bmp" width="100%" height="100%"></p>
</div>


Does get a little distorted depending upon how you resize the browser though, but with the right image it would do ok.
 
Look at http://www.elizabethcountrykennels.com/samplebackground.htm - http://www.elizabethcountrykennels.com/samplebackground.htm . It is still not exactly right. Does anyone have any ideas on how I can fix this?


Posted By: dpyers
Date Posted: 18 June 2005 at 2:33am
If by "not exactly right" you mean that ii doesn't fill the page, add this css between the head tags to eliminate the margin and padding of the html block elements
Quote <style type="text/css">
body, div, p, img {
     margin:0px;
     padding:opx;
}
</style>



-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Misty
Date Posted: 18 June 2005 at 2:44am
It didn't solve the problem.


Posted By: dpyers
Date Posted: 18 June 2005 at 3:18am
Perhaps I'm misunderstanding the problem. The image fills the screen and resizes in ie, netscape, mozilla, and ff here -

  http://www.sitetechnique.com/background.htm - http://www.sitetechnique.com/background.htm



-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Mart
Date Posted: 18 June 2005 at 4:27am
Also, you might want to remove the <p></p> tags, as they  start a new paragraph, which would give you a gap


Posted By: Misty
Date Posted: 18 June 2005 at 1:32pm
Thanks! I finally got it working.


Posted By: Misty
Date Posted: 20 June 2005 at 10:38pm
1.) Can someone please help me to figure out the exact color of the roof?
 
2.) I noticed that this picture is blurred. Is there any way that I could clear it up? I know that it's probably due to the size of the picture.


Posted By: ub3rl337ch3ch
Date Posted: 20 June 2005 at 11:31pm
The roof isn't a single colour, as you can tell if you loo closely. the 'blurring' is partly because it was created as a jpeg with high compression and partly because the resolutions is too low. Neither of those can be fixed from that image alone, you'd need another version of it.


Posted By: Misty
Date Posted: 21 June 2005 at 1:37am
I understand that the roof's color is not a single color. But I was wondering if someone could please help me find the color that is the closest to the color in the roof.


Posted By: ub3rl337ch3ch
Date Posted: 21 June 2005 at 1:46am
Hex={A7,0B,0E} looks about right.


Posted By: dpyers
Date Posted: 21 June 2005 at 9:44am
Most paint programs will allow you to define a custom "brush" by selecting an area of a pic that you want to be able to "paint" with the brush. It'll replicate the pattern you select.
You can also usually create a new pattern "fill".


-------------

Lead me not into temptation... I know the short cut, follow me.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net