HTML Tutorial


 /help/HTML Help Forum   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
freeze background
Goto page 1, 2, 3  Next
Post new topic   Reply to topic    HTML Help Forum -> General HTML
View previous topic :: View next topic  
Author Message
eTch21Kai



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

PostPosted: Thu May 13, 2004 3:30 pm     freeze background Reply with quote

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



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

PostPosted: Thu May 13, 2004 7:08 pm     Reply with quote

Add bgproperties=fixed to your body tag
eTch21Kai



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

PostPosted: Fri May 14, 2004 11:29 am     Reply with quote

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



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

PostPosted: Fri May 14, 2004 3:06 pm     Reply with quote

no problem - glad to help Very Happy
LIL_ORGULLOSA



Joined: 21 May 2004
Posts: 1

PostPosted: Fri May 21, 2004 4:09 pm     Reply with quote

AWW I DID THAT BUT IT DIDNT' WORK CAN SOMEOENE HELP ME!!!!!!!!
Corey Bryant
Site Admin


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

PostPosted: Sat May 22, 2004 6:54 am     Reply with quote

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

PostPosted: Sat May 22, 2004 11:57 pm     Reply with quote

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
Site Admin


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

PostPosted: Sun May 23, 2004 6:03 am     Reply with quote

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

PostPosted: Sun May 23, 2004 11:17 am     Reply with quote

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

PostPosted: Fri May 13, 2005 3:38 pm     Thank You Reply with quote

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. Laughing
Corey Bryant
Site Admin


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

PostPosted: Fri May 13, 2005 3:40 pm     Reply with quote

Welcome ogcujo and thank you!

Good luck with your website!
bedhead



Joined: 24 Sep 2006
Posts: 1

PostPosted: Sun Sep 24, 2006 1:03 pm     background image fit to frame? Reply with quote

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


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

PostPosted: Sun Sep 24, 2006 1:48 pm     Re: background image fit to frame? Reply with quote

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

PostPosted: Sun Oct 08, 2006 8:54 am     Reply with quote

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
Site Admin


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

PostPosted: Sun Oct 08, 2006 11:20 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum -> General HTML All times are GMT - 8 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial