Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is it possible to make the header section fixed?
I tried this css
#section-header {
position:fixed;
top:0px;
left:0px;
z-index:100;
}
Doesn't seem to work. Did I make a coding error? Or is it even possible with this layout?
Comments
Comment #1
vinoth.3v CreditAttribution: vinoth.3v commentedsame here.
any help?
Comment #2
dddbbb CreditAttribution: dddbbb commentedI'd also be interested to see if anyone has a good, CSS only solution for this.
Comment #3
dddbbb CreditAttribution: dddbbb commentedThis is working for me so far but I've only tested in Firefox 13 on OS X. You'll need to replace the height and margin-top properties with the actual height of your header.
I too would like to know how reliable this is in other browsers so if you hit any issues and/or have any fixes then please post back here.
Comment #4
vinoth.3v CreditAttribution: vinoth.3v commentedworks, but we also have to concentrate the following issues which I have noticed.
works good on chromium @ linux
Comment #5
vinoth.3v CreditAttribution: vinoth.3v commentedseems working if we use padding-top instead of margin-top.
Comment #6
Vako CreditAttribution: Vako commentedCheck the following links for doing not only fixed headers, but also footers and static banner of your website:
http://www.jasonglisson.com/creating-fixed-header-region-drupal-7
http://lifeinthegrid.com/simple-css-fixed-header/