This is a discussion on "Html:stretching A Background To Page" within the Web Page Design section. This forum, and the thread "Html:stretching A Background To Page are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Html:stretching A Background To Page
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Html:stretching A Background To Page
I am having to make a site and I need it so the background stays the same size as the monitor resolution and so it doesn't tile it self.
<HTML> <HEAD> <TITLE>Welcome to the wood shop safety test</TITLE> </HEAD> <BODY background="cherry3.jpg"> </body> </html> |
|
|
|
|||
|
Re: Html:stretching A Background To Page
Use css with background-attachment, background-position, and background-repeat. All of which can be controlled with one background element.
body { background: color image repeat attachment position; } Make sure attachment is fixed. This will not stretch the background. But it will remain the same regardless of resolution. Good Luck, Scott |
|
|||
|
Re: Html:stretching A Background To Page
I dont really understand what you provided me can you explain what to do with that. Thank you.
|
|
|||
|
Re: Html:stretching A Background To Page
I'm going to assume that you don't know CSS as send you here.
Or do a search for CSS and study a bit. CSS is Cascading Style Sheets and is used for defining the presentation of the content on your site. I would suggest a few tutorials, css can be a bit confusing at first. Good Luck, Scott |
|
|||
|
Re: Html:stretching A Background To Page
If you do not want the background to be tiled, you can simple add the no-repeat value.
If you want the background to stay at it's place, and do not scroll with the page, you need the attachment:fixed; attribute that was mentioned above.
If you want to stretch the background to full screen, you have to use some divs
|
|
||||
|
Re: Html:stretching A Background To Page
This thread might be of some help ... see posts by Aerospace_Eng
|
|
|||
|
Re: Html:stretching A Background To Page
You say you want the background to stay the same size according to the monitor resolution?
Set the size so that it isn't in pixels, and make it a percentage, for example, 100% to make the background fill up the entire screen no matter what resolution the computers are running. |
|
|||
|
Re: Html:stretching A Background To Page
Quote:
Have you tried that? It seems it would stretch the image and distort it big time. Unless the image is a gigantic! |
|
|||
|
Re: Html:stretching A Background To Page
Yes, that will happen, especially if the resolution is crazy and weird (like mine). That might not be, and probably is not, the desired effect...
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Linking to an html page | rusty149 | Web Page Design | 1 | Feb 4th, 2008 10:34 |
| .swf file as HTML table background | bubberz | Flash & Multimedia Forum | 9 | Jun 18th, 2007 21:45 |
| Background page not showing up | aaronh | Web Page Design | 4 | Apr 30th, 2007 19:30 |
| Repeating an image along the bottom of the page without setting it as background. | imagius | Web Page Design | 9 | Apr 27th, 2007 08:35 |
| Open xml in new html page | kingfrank | JavaScript Forum | 3 | Apr 4th, 2007 11:26 |