Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Background Picture
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedBackground Picture

 Post Reply Post Reply Page  123>
Author
Misty View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
Direct Link To This Post Topic: Background Picture
    Posted: 17 June 2005 at 1:09pm

I am experimenting with a picture as the background at 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.

Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Direct Link To This Post Posted: 17 June 2005 at 1:26pm
in the body tag just add:

style="background-repeat: no-repeat"
Back to Top
Misty View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
Direct Link To This Post 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?
Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Direct Link To This Post Posted: 17 June 2005 at 2:08pm
Style property width = 100%?
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Direct Link To This Post 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.
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Direct Link To This Post 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?
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Direct Link To This Post 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.


Edited by dpyers - 17 June 2005 at 5:16pm

Lead me not into temptation... I know the short cut, follow me.
Back to Top
Misty View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
Direct Link To This Post 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. It is still not exactly right. Does anyone have any ideas on how I can fix this?
Back to Top
 Post Reply Post Reply Page  123>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.