•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 402,662 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,255 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 1452 | Replies: 2 | Solved
![]() |
•
•
•
•
Hello all,
I'm new in here and i want learn something, CSS!.
Well i have some problem for css, i need to know how to make fixed image background, please see my attached file.
please help me for tag and css properties. i really need help. thanks
thanks all.
<HEAD>
<STYLE type="text/css">
background-image: url('imageurl.jpg');
background-repeat: no-repeat;
background-position: 30% 20%;
</STYLE>
</HEAD>you can change the background-postion line to suit where you wish to have your image, or to specify an absolute position use "px" instead of "%"
When Autumn Falls [ http://www.whenautumnfalls.co.uk ] &&
Designdotworks [ http://www.designdotworks.co.uk ] Web / Graphic / Software Design
Designdotworks [ http://www.designdotworks.co.uk ] Web / Graphic / Software Design
•
•
Join Date: Jul 2006
Location: Deptford, London
Posts: 943
Reputation:
Rep Power: 5
Solved Threads: 47
add a:
to your body tag's CSS rules; if you want the background to stay still wherever the user scrolls.
bear in mind, this might not work in all browsers,.. i can confirm it works in IE6 and Opera, but I seem to remember having trouble with it at some point..
CSS Syntax (Toggle Plain Text)
background-attachment: fixed
bear in mind, this might not work in all browsers,.. i can confirm it works in IE6 and Opera, but I seem to remember having trouble with it at some point..
If it only works in Internet Explorer; it doesn't work.
![]() |
•
•
•
•
•
•
•
•
DaniWeb HTML and CSS Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- using image for background on index page? (Site Layout and Usability)
- Display image for background (Java)
- background image - help (HTML and CSS)
- Fixed BG image in IE (HTML and CSS)
Other Threads in the HTML and CSS Forum
- Previous Thread: keeping the data
- Next Thread: Removing Page "border"


Linear Mode