The ProgrammersTalk Community
Forum Register Search Today's Posts Mark Forums Read
Register

Go Back   The ProgrammersTalk Community > Web Programming > DHTML > HTML


Welcome to the The ProgrammersTalk Community forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
Tags:

Closed Thread
 
LinkBack Thread Tools    Display Modes   
  #1 (permalink)  
Old 06-10-2007, 04:22 PM
will
Posts: n/a
[SOLVED] How do I use html programming....?

How do I use html programming to have an image that doesn't move as my background for my page and have an image on top of it that dows move. Like the one on the bottom of this web site (http://www.starcraft2.com/) (scroll to the bottom to see)???

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
  #2 (permalink)  
Old 06-10-2007, 04:22 PM
gogglecollector
Posts: n/a
For the fixed background image, you can use CSS. Put the following between the <head> and </head> tags on your page:

<style type="text/css">
body {
background-image: url(yourfilenamehere.jpg);
background-attachment: fixed;
}
</style>

Alternatively, you could add that as an attribute in the HTML itself, like this:
<body style="background-image: url(yourfilenamehere.jpg); background-attachment: fixed;">

For the image that does move, use the <img> tag between the <body></body> tags:
<img src="yourimagethatmoves.jpg" />

A few notes on this. First, your images do not have to be JPGs - they can be any image file type - JPGs, GIFs, PNGs, etc. Second, the / before the end of the <img> tag (just for your reference) is there because in the new XHTML specifications, tags that do not have a closing tag (like </body> for the <body> tag) have the slash within the opening tag itself. Not necessary, but it's good valid XHTML. Third, using the code provided above, the fixed background image will repeat indefinitely in both directions. To stop this, add in the following on a new line between the <style></style> tags in the first option or at the end of the style attribute in the <body> tag for the second example: "background-repeat: none;" (no quotes though). Replacing "none" with "repeat-x" or "repeat-y" will make it repeat in only one direction - just don't forget the semi-colon at the end of the line! Finally, to get the transparency effect like on the Starcraft page requires work in Photoshop or another image editor, and saving the image as a GIF or PNG that allows for transparency. That cannot be done inside the HTML script, although there might be some ways of doing this with JavaScript.

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
  #3 (permalink)  
Old 06-10-2007, 04:22 PM
HEART924
Posts: n/a
Maybe this link could help.
All about HTML tutorials here.
http://www.freewebtown.com/karen924/index.html

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
  #4 (permalink)  
Old 06-10-2007, 04:22 PM
dubbarob
Posts: n/a
your background would be given a fixed position.
http://webdesign.about.com/od/faqsandhelp/f/bl_faq5_2a.htm

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Closed Thread


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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 06:03 PM. Powered by vBulletin
Copyright © 2000 - 2007, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO © 2007 ProgrammersTalk Sedo - Buy and Sell Domain Names and Websites project info: programmerstalk.net Statistics for project programmerstalk.net etracker® web controlling instead of log file analysis


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50