HighDots Forums  

fixed background images

alt.html.writers alt.html.writers


Discuss fixed background images in the alt.html.writers forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bier de Stone
 
Posts: n/a

Default fixed background images - 05-21-2005 , 04:15 PM






I`m trying to figure out how to create a fixed image on my page that
doesn`t move when the scroll bar is moved. This is what my html source
code looks like for the image

<body background="image.gif">

Does it matter whether I use a .jpg or .gif image? How can I make an
image stationary in the page?

--
\ /

⁄ \
COMING SOON blog <http://r.aguirre.home.att.net/reversepilcrow.html>

Reply With Quote
  #2  
Old   
Els
 
Posts: n/a

Default Re: fixed background images - 05-21-2005 , 04:20 PM






Bier de Stone wrote:

Quote:
I`m trying to figure out how to create a fixed image on my page that
doesn`t move when the scroll bar is moved. This is what my html source
code looks like for the image

body background="image.gif"

Does it matter whether I use a .jpg or .gif image? How can I make an
image stationary in the page?
I only know how to do it with CSS:
<body
style="background-image:url(image.gif);background-attachment:fixed;">

or better:
<body>
and in the <head> of your file:
<style type="text/css">
body{
background-image:url(image.gif);
background-attachment:fixed;
}
</style>

You can also position it, and decide whether you want it to repeat
when the window is larger than the image:
background-position:left center;(or center, or center top, center
bottom, right center, right top, left bottom ...)
background-repeat:no-repeat;(or repeat-x, repeat-y, or repeat)

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vo. O resto imperfeito.
- Renato Russo -
Now playing: Stealers Wheel - Stuck In The Middle


Reply With Quote
  #3  
Old   
Elephant
 
Posts: n/a

Default Re: fixed background images - 05-22-2005 , 10:34 AM



Bier de Stone wrote:
Quote:
I`m trying to figure out how to create a fixed image on my page that
doesn`t move when the scroll bar is moved. This is what my html source
code looks like for the image

body background="image.gif"
Here's what I use on my web page. gif or jpg does not matter.

<BODY bgProperties=fixed BACKGROUND="clouds.jpg">

Let me know if it works for you.


Reply With Quote
  #4  
Old   
Adrienne
 
Posts: n/a

Default Re: fixed background images - 05-23-2005 , 01:28 AM



Gazing into my crystal ball I observed Elephant <elephant (AT) the-zoo (DOT) com>
writing in news:4290A674.1345 (AT) the-zoo (DOT) com:

Quote:
Bier de Stone wrote:

I`m trying to figure out how to create a fixed image on my page that
doesn`t move when the scroll bar is moved. This is what my html source
code looks like for the image

body background="image.gif"

Here's what I use on my web page. gif or jpg does not matter.

BODY bgProperties=fixed BACKGROUND="clouds.jpg"

Let me know if it works for you.

Background for the Body element is deprecated for HTML 4.01, as is
bgProperties. Use css:
Body {background-image:url("clouds.jpg"); background-attachement: fixed}

One of the good things about using an external stylesheet is that if you
get tired of that background, you don't have to go into many, many pages
and change the markup. Just one change in the CSS file changes ALL pages.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share


Reply With Quote
  #5  
Old   
Bier de Stone
 
Posts: n/a

Default Re: fixed background images - 05-29-2005 , 01:31 AM



Adrienne wrote:

Quote:
Gazing into my crystal ball I observed Elephant <elephant (AT) the-zoo (DOT) com
writing in news:4290A674.1345 (AT) the-zoo (DOT) com:



Bier de Stone wrote:


I`m trying to figure out how to create a fixed image on my page that
doesn`t move when the scroll bar is moved. This is what my html source
code looks like for the image

body background="image.gif"


Here's what I use on my web page. gif or jpg does not matter.

BODY bgProperties=fixed BACKGROUND="clouds.jpg"

Let me know if it works for you.




Background for the Body element is deprecated for HTML 4.01, as is
bgProperties. Use css:
Body {background-image:url("clouds.jpg"); background-attachement: fixed}

One of the good things about using an external stylesheet is that if you
get tired of that background, you don't have to go into many, many pages
and change the markup. Just one change in the CSS file changes ALL pages.



Thanks for the tip. I`ll keep in mind that css is the way to go. Does
anybody have a clue to the image size that would best fit a browser
window (without image repetition)? I don`t have my image yet, but I have
visions of framing the outer edges of the browser window with a snake,
a.k.a. Ourobouros. I know that this symbol normally should be in the
shape of a circle and I am crossing my fingers that I`m not the target
of any mysterious organizations that may take offense of my distortion,
but as it goes, I may be inclined to maintain aspect ratios and all of
that to enforce the ideological sense this symbol may convey with a
cycle. I guess an oval snake eating it`s own tail is better than a
square one.

--

\ /

/ \
"Backward ideas" http://r.aguirre.home.att.net


Reply With Quote
  #6  
Old   
Adrienne
 
Posts: n/a

Default Re: fixed background images - 05-29-2005 , 02:16 AM



Gazing into my crystal ball I observed Bier de Stone <artworld (AT) att (DOT) net>
writing in news:42996171.6010409 (AT) att (DOT) net:

Quote:
Thanks for the tip. I`ll keep in mind that css is the way to go. Does
anybody have a clue to the image size that would best fit a browser
window (without image repetition)?
You really don't want to do this. In order to do so, you would have to do
some client side javascript available height/width sniffing, and present an
image close to that size, so you might have to have many images. Not a
good idea.

Better would be to make one image and center it with no repeat. Make it
like a watermark, and make sure that text can be read over it.

Of course, you could hold your legs together and wait for CSS3
<http://www.w3.org/TR/2005/WD-css3-ba...he-background-
size> where the background-size property will do just what you want.


--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.