Welcome our webmaster and SEO forum
Please enjoy the forum, contribute what you can, and wind up the Moderators!
Results 1 to 10 of 10

Thread: How to make....

  1. #1
    Computer Master is offline Junior Member
    Join Date
    Oct 2008
    Posts
    3

    Default How to make....

    Hi all

    Can anybody tell me how to make a fixed footer / header with the help of CSS.

    Thanks

  2. #2
    MaskedSuperstar is offline Junior Member
    Join Date
    Nov 2008
    Posts
    10

    Default

    set the position

  3. #3
    BlueBoden's Avatar
    BlueBoden is offline Member
    Join Date
    Nov 2008
    Posts
    72

    Default

    In my experience, footer + header layouts are best achieved using a float based layout, optionally combined with relative positioning.

    Have a look at the CSS Float Based Layouts or Equal Height Columns using Floats.

  4. #4
    myst729's Avatar
    myst729 is offline Junior Member
    Join Date
    Oct 2008
    Posts
    16

    Default

    Use the position attribute.
    Well... is this a good way to code html? Feel like a little strange...

  5. #5
    anurdh65 is offline Junior Member
    Join Date
    May 2009
    Posts
    9

    Default fixed header / footer

    here is the code for your question
    <!-- IE in quirks mode -->
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
    <title>Fixed header and footer</title>
    <style type="text/css">
    body{
    margin:0;
    padding:header-<length> 0 footer-<length> 0;
    }
    div#header{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:header-<length>;
    }
    div#footer{
    position:absolute;
    bottom:0;
    left:0;
    width:100%;
    height:footer-<length>;
    }
    @media screen{
    body>div#header{
    position:fixed;
    }
    body>div#footer{
    position:fixed;
    }
    }
    * html body{
    overflow:hidden;
    }
    * html div#content{
    height:100%;
    overflow:auto;
    }
    </style>
    <div id="header"> header </div>
    <div id="footer"> footer </div>
    <div id="content"> content </div>

  6. #6
    chrisy. is offline Junior Member
    Join Date
    May 2009
    Posts
    12

    Default

    PM me if you want the firefox adjusted code too.

  7. #7
    surreypcsupport's Avatar
    surreypcsupport is offline Senior Member
    Join Date
    Nov 2008
    Location
    surrey
    Posts
    565

    Default

    I always create headers/footers using scripting languages like PHP or ASP.net. That way you can re-use the same piece of code for all pages and if you need to change the header or footer you only need to make the change once instead of for every page.

  8. #8
    sonuinfy is offline Junior Member
    Join Date
    May 2011
    Location
    London
    Posts
    6

    Default

    Quote Originally Posted by surreypcsupport View Post
    I always create headers/footers using scripting languages like PHP or ASP.net. That way you can re-use the same piece of code for all pages and if you need to change the header or footer you only need to make the change once instead of for every page.
    I agree. Better use header.php and footer.php. You'll then have to edit only these 2 files.
    Hope this helps

  9. #9
    serena85 is offline Senior Member
    Join Date
    Apr 2011
    Posts
    200

    Default

    Just read the help menu in dreamwaver and there you have it.
    A lot of iPad apps reviews and new iPad app that you can use for your iPad or iPhone.

  10. #10
    webmast128 is offline Junior Member
    Join Date
    Jun 2011
    Posts
    1

    Default

    Creating a web layout with a fixed header and footer is quite easy in your modern browsers like Firefox, IE7/IE8, Opera, Safari, Chrome, etc. It's simply done by using the CSS property declaration position: fixed. Unfortunately,browser IE6 does not support the fixed value, and treats it as if it were position: static which is far from the results that position: fixed achieves.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

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
  •  

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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124