It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

fixing an image in the background

fixing an image in the background

Postby FlyingDutchman07 on Tue Mar 20, 2007 2:45 pm

I'm a beginner so I'm not very fluent with HTML yet. So with that being said, I want to place an image in the background so that when you scroll down the page, it stays in the center of the screen. Here's an example of what I mean http://www.adesdesign.net/php/tutorials/css/fixed.html

I viewed the page source and found the code:

<style type="text/css">
body {background: url(images/fixedbg.gif) fixed center no-repeat;}
</style>

I tried copying and pasting the code in my document in Dreamweaver, but it doesn't seem to work. I'm not exactly sure if I need to change the url part or not, since I'm trying to use a picture from a folder on my computer. Maybe there's other ways to code it? Thanks for the help!
FlyingDutchman07
 
Posts: 0
Joined: Tue Mar 20, 2007 2:27 pm
Location: Hartville, Ohio

Postby jberry on Tue Mar 20, 2007 3:19 pm

If you are using dreamweaver the best way todo it would be with css go to Text on the menu bar then css>new> when the box comes up click the first circl and name it whatever ex(.center_image) another box will come up and click on background you will want to select the image and in the repeat box no-repeat and the attachment box would be fixed. that is how you can fix an image to the page with out it moving.


Jason
www.theromanceshoppe.net
jberry
100+ Club
 
Posts: 144
Joined: Mon Mar 19, 2007 4:40 pm
Location: Atlantic City, NJ


Who is online

Users browsing this forum: No registered users and 11 guests