Header Fixed like Facebook

Disclaimer: This add-on is not officially supported by phpFox.

What does it do?
This little change in your sites CSS will force the top part of your site so it does not move when a user scrolls up/down, which is how it works on Facebook at this time.

Tested On
Firefox 8, Chrome 15 and IE9

Theme Compatibility
This has only been tested using our default theme. If your custom theme is using our default theme as a parent this add-on could work, however you will probably have to adjust the positioning of the header.

phpFox Minimum Version
This add-on requires phpFox v3.0.0 stable or higher.

Live Demo
Can be tested on our live demo. Select the theme "Default Fixed Menu".

Can I modify it?
Yes, you can modify and redistribute this add-on. This was a quick add-on to run some tests and it is intended for others to use and improve it.

Installing
To get this little add-on working, log into your AdminCP and go to...
Extension >> Theme >> Manage Themes >> Default >> Manage Styles >> Default >> Edit CSS

Click on "Global CSS" and edit the file "custom.css".

Add the following:
CSS:
#header
{
      position:absolute;	
      width:100%;
      top:0px;
      z-index:1007;
}


body > #header
{
      position:fixed;
}

#main_core_body_holder #main_content_holder
{
	margin-top:70px;
}

#main_core_body_holder_guest #main_content_holder
{
	margin-top:78px;
}

.user_register_holder
{
        margin-top:130px;
}

body.main_core_body_holder_class #header,
body.main_core_body_holder_class #main_core_body_holder #main_content_holder
{
       position:static;
       margin-top:0px;
}


Once you have saved this file clear your sites cache.

This change is specific to the default theme that does not have a logo. Make sure to edit "margin-top" based on your theme.


Reviews
chand wrote at May 10, 2012, 5:15 am

Its really a great, Please included this as default in phpFox v3.x and option to choose Fixed menu or not

chand
SporeDev wrote at April 24, 2012, 7:22 pm

Thanks for sharing! its important to note that this addon to the css may make the header overlap your main content. if it does, search for #main_content_block within the same css file and edit padding-top accordingly.

SporeDev
utomo wrote at April 18, 2012, 3:41 am

I think it is great if this included as default on the phpFox.
so we can choose to have Fixed menu or not.

utomo
tavanur wrote at April 16, 2012, 4:42 pm
Thank you
tavanur
Dakheel wrote at April 12, 2012, 6:58 pm

Great job Wink

Dakheel
agusalsa wrote at April 4, 2012, 3:48 pm

Thank you, great job, works perfect for me.

agusalsa
CrazyCam wrote at March 24, 2012, 10:13 am

fantastic share thanks so much - works perfectly - awesome

CrazyCam
Cfriskme wrote at March 2, 2012, 10:26 pm

Ray you are the best!

Cfriskme
awg wrote at February 28, 2012, 11:52 am

Cant customize dashboard. use theme button is hidden.

awg
global wrote at February 18, 2012, 4:00 pm

yea it works but take a look at profiles the members photos are only showing half everything else is perfect but the left side of the members profiles is not even leaving the default photo only showing half

global
Displaying 1 to 10 of 20