Fixed Header / Menu
-
Hi Guys,
Apologies if this has been brought up before. Nothing concrete seemed to be coming up in a google search.
Is there any way of fixing the header / menu in the Twenty Eleven theme so it remains at the top of the page regardless of what content is underneath ? – Example would be the old use of HTML frames etc…
Cheers,
Paul.
-
Yes, you would likely need to use fixed positioning in the CSS code for that section of the page. Do you have a child theme set up or custom CSS plug-in — that would be the first step as you do not want to make changes to theme files.
I’m experimenting with child themes at the moment.
You wouldn’t know exactly what code needs to be changed, would you ?
Cheers,
Paul.
Not without seeing the site live (with the child theme or custom CSS set up).
The site can be found at: http://www.themysterytosleep.me.uk/
The child theme has been setup at:
http://www.themysterytosleep.me.uk/wp-content/themes/twentyeleven/twentyeleven-child/style.css
Ignore the added CSS, that’s just me experimenting at the moment.
Cheers,
Paul.
You don’t have a child theme activated on that site — you need to do that first.
Should be active now.
Was following a tutorial that suggested putting the theme within the original theme folder rather than the parent. – Make no wonder it wasn’t working 🙂
So, if you can offer any suggestions it would be appreciated.
Cheers,
Paul.
Try just changing the position to fixed here:
#branding { border-top: 2px solid #BBBBBB; padding-bottom: 10px; position: fixed; z-index: 9999; }Then you may need to adjust some other things but that’s the main piece.
Yeah, that appears to be on the right track. Just need to get my head around CSS positioning and the right parts to modify…
Thanks for your help!
Are you using Firebug? It’s by far the best way to work with CSS – shows you all the info in a snap and lets you test changes out.
The topic ‘Fixed Header / Menu’ is closed to new replies.