HTML Help Forum Index HTML Help
Please Search for the answer to your question before asking it! Thanks.
 

freeze background
Post a Reply to this Topic Ask a New Question Goto page 1, 2  Next
Click here to go to the original topic
       HTML Help Forum Index -> General HTML
View previous topic :: View next topic  
Author Message
eTch21Kai



Joined: 13 May 2004
Posts: 2
Location: Pa.

Posted: Thu May 13, 2004 3:30 pm     freeze background  

What tag am i supposed to use to keep the background stationary when the text moves?
mjpliv



Joined: 11 May 2004
Posts: 406
Location: Nova Scotia

Posted: Thu May 13, 2004 7:08 pm      

Add bgproperties=fixed to your body tag
eTch21Kai



Joined: 13 May 2004
Posts: 2
Location: Pa.

Posted: Fri May 14, 2004 11:29 am      

oh yeah that's it! thanx. ^_^
mjpliv



Joined: 11 May 2004
Posts: 406
Location: Nova Scotia

Posted: Fri May 14, 2004 3:06 pm      

no problem - glad to help :D
LIL_ORGULLOSA



Joined: 21 May 2004
Posts: 1

Posted: Fri May 21, 2004 4:09 pm      

AWW I DID THAT BUT IT DIDNT' WORK CAN SOMEOENE HELP ME!!!!!!!!


Corey Bryant



Joined: 15 May 2004
Posts: 8426
Location: Castle Pines North, CO USA

Posted: Sat May 22, 2004 6:54 am      

Make sure you use something like this:
Code: <BODY BACKGROUND="images/background.gif" BGPROPERTIES=FIXED>
But a much better way is using CSS, place this in the <HEAD>:
Code: <style type="text/css">
body
{
background-image: url("images/background.gif");
background-attachment: fixed
}
</style>
Dukie



Joined: 11 May 2004
Posts: 4
Location: Toronto, Canada

Posted: Sat May 22, 2004 11:57 pm      

hey guys,
I got a question that is related to this. When using the fixed property, how do I get an image to basicly stretch all over the screen? instead of seeing multiples of the same image in the background, you see only 1.


Thanks,
Duke
Corey Bryant



Joined: 15 May 2004
Posts: 8426
Location: Castle Pines North, CO USA

Posted: Sun May 23, 2004 6:03 am      

A background will tile. You are not able to stretch the background image. You can use CSS to place the background once on your webpage:
Code: <style type="text/css">
body
{
background-image: url("images/background.jpg");
background-repeat: no-repeat
}
</style>
or
Code: <style type="text/css">
body
{
background-image: url("images/background.jpg");
background-repeat: no-repeat;
background-attachment: fixed
}
</style>
or maybe even:
Code: <style type="text/css">
body
{
background-image: url("images/background.jpg");
background-repeat: no-repeat;
background-attachment: fixed;
background-position: top center
}
</style>
More info: http://www.w3schools.com/css/css_background.asp
Dukie



Joined: 11 May 2004
Posts: 4
Location: Toronto, Canada

Posted: Sun May 23, 2004 11:17 am      

Corey Bryant wrote: A background will tile. You are not able to stretch the background image. You can use CSS to place the background once on your webpage:
Code: <style type="text/css">
body
{
background-image: url("images/background.jpg");
background-repeat: no-repeat
}
</style>
or
Code: <style type="text/css">
body
{
background-image: url("images/background.jpg");
background-repeat: no-repeat;
background-attachment: fixed
}
</style>
or maybe even:
Code: <style type="text/css">
body
{
background-image: url("images/background.jpg");
background-repeat: no-repeat;
background-attachment: fixed;
background-position: top center
}
</style>
More info: http://www.w3schools.com/css/css_background.asp
Thanks you!!
ogcujo



Joined: 13 May 2005
Posts: 1
Location: Florida

Posted: Fri May 13, 2005 3:38 pm     Thank You  

Hi Im new on the forums, I mainly registered to thank Corey Bryant. Iv been breaking my head trying to place a background without it tileing, I did a google search and found this thread. Actually another forum that linked to this one. I want to say Thank You!!! I'm sure I'll find answers to other questions hear too. :lol:
Corey Bryant



Joined: 15 May 2004
Posts: 8426
Location: Castle Pines North, CO USA

Posted: Fri May 13, 2005 3:40 pm      

Welcome ogcujo and thank you!

Good luck with your website!
bedhead



Joined: 24 Sep 2006
Posts: 1

Posted: Sun Sep 24, 2006 1:03 pm     background image fit to frame?  

Hi, wondering if there is any way i can get a background image to resize when the frame is changed
Corey Bryant



Joined: 15 May 2004
Posts: 8426
Location: Castle Pines North, CO USA

Posted: Sun Sep 24, 2006 1:48 pm     Re: background image fit to frame?  

bedhead wrote: Hi, wondering if there is any way i can get a background image to resize when the frame is changed Check out background image fit to screen?

_________________
Corey
Toll Fax Numbers | Merchant Accounts
Sargeist



Joined: 08 Oct 2006
Posts: 1

Posted: Sun Oct 08, 2006 8:54 am      

Sorry to bump this old thred, but I could use some help with centering my bg picture...
here's my HTML(its basic, because Im just starting out and its the only thing I know)

<body bgcolor="#000000" background="some image.gif" style="background-repeat:no-repeat" style="background-position:center" style="background-attachment:fixed">

I tried using instead of that : top center; 50%50%; 200px200px
but nothing worked, image stays in the top left corner at all times...

please help...thank you in advance.
Corey Bryant



Joined: 15 May 2004
Posts: 8426
Location: Castle Pines North, CO USA

Posted: Sun Oct 08, 2006 11:20 am      

Just combine everything - using all those styles - the browser will get confused CSS Background Code: <body style="background: #000 url('some image.gif') no-repeat center fixed"> should be more like it.

_________________
Corey
Toll Free Numbers | Merchant Accounts
 
 
HOSTING / DESIGN
MAKE MONEY

       HTML Help Forum Index -> General HTML Goto page 1, 2  Next
Page 1 of 2


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group