Results 1 to 2 of 2

Thread: How do I get a fixed background on a web site?

  1. #1
    Join Date
    Aug 2009
    Posts
    3

    Exclamation How do I get a fixed background on a web site?

    How do I get a fixed background on a web site? I want the background to stay in one place but when I scroll down for the menu to move, (Example: http://www.eteaket.co.uk/index.html) I am using Dreamweaver CS4.

  2. #2
    Join Date
    Aug 2009
    Location
    Canerica
    Posts
    14
    In the CSS for your website you should see some code that looks somewhat like this:

    Code:
    body {
    	font: 100% Verdana, Arial, Helvetica, sans-serif;
    	background-image:url(CSSImages/bg.jpg);    /* Obviously this will be different for your website
    	margin: 0; 
    	padding: 0;
    	text-align: center; 
    	color: #000000;
    }
    Add a new line that has

    Code:
    background-attachment: fixed;
    Over all It'll look like this!

    Code:
    body {
    	font: 100% Verdana, Arial, Helvetica, sans-serif;
    	background-image:url(CSSImages/bg.jpg);    /* Obviously this will be different for your website
    	margin: 0; 
    	padding: 0;
    	text-align: center; 
    	color: #000000;
            background-attachment: fixed;
    }
    This will lock your background image in place. Hope this helped!

Similar Threads

  1. Writer Wanted For New Web Site!
    By george1 in forum Freelancing
    Replies: 1
    Last Post: 02 Apr 2008, 02:10 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •