Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text floats over image, how is it done? 1

Status
Not open for further replies.

nellj

Technical User
Jun 23, 2000
4
US
I am new to HTML coding and am not sure what this "floating image" means.

I have seen a site that has text that scrolls down the page but the background image stays fixed in place. It looks like a sand-blasted glass
with text on it sliding over the picture. Is this what a "floating image" is?

If not, would you give a clue as to what I saw on the site described above?
Also, where do I find the coding for this to happen in my page? Any help will
be greatly appreciated.
 
These effects are achieved thru the use of DHTML. We use the style properties of tags to modify a tag's so called style properties including position, color, font aspects, indenting...the list goes on.

Now what you have described is a background image with its scrolling turned off, so here is some code for you:

<style type=&quot;text/css&quot;>
BODY{background:url(pathToSomeImage)
background-position:center
background-attachment:fixed;}
</style>


Once you get more used to the definitions you can combine them.
This applies a background image to the whole page,because I have modified the body tag but you can use them on tables and divs too.
If you want to learn more about DHTML you can visit:
They have heaps of tutorials to learn all about style sheets and JavaScript coupling. Congrats, you're on your way!
&quot;Alright whatever man, I'll hook up the hair, but I aint touchin the ring though...Cause I'm still a pla--yer&quot;
 
Thanks for the input. I will check out the site.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top