Results 1 to 3 of 3

Thread: Keep back ground fix..as well as header

  1. #1
    Join Date
    Jan 2005
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Keep back ground fix..as well as header

    How to keep bg fixed with top header non moving

    refer http://vedasprojects.com/

    I want to keep the top header fixed

    At present when i scroll the page , the top header moves ...

    I dont want the header to move ...

    please help

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You can use the CSS property position:fixed; to hold the header in place. Remember then you will need to move the rest of the page down, so you will probably want to add about 150px of padding to the content part, under the header.

    For the background you can use the CSS property background-attachment: fixed;, for example on the body tag.

    Another option you might consider is doing the opposite: make a smaller div that scrolls within the page so that the header and page background never move. Then this smaller div will scroll as needed. (Set a limited height and set overflow:scroll;.)
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Oct 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hey,

    daniel you have shared very good way to explain and solve the bg issue..
    Well I am also facing the issue,, so your this way is very helpful to me..
    Affordable Webhosting|Low price web hosting
    Last edited by Avena; 10-03-2011 at 09:55 PM.

Bookmarks

Posting Permissions

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