Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Fixed header problem in Opera (only) Re: Fixed header problem in Opera (only)

#108353
Cornucopia
Participant

Hi jurotek, it still didn’t work as it was (your solution appeared to drop the header down in all but Opera) but after some fiddling, realised that if I applied 115px to margin-top of .container, that made all browsers display correctly. So thanks very much for getting me on the right track.

Actually, maybe you can help me with a related query? I have page anchors on eg this page: http://1056618737.test.prositehosting.co.uk/beef-recipes . If you click on Beef stroganoff in the menu on the right side-bar or at the top of the main content, the anchor target disappears behind the fixed header on all browsers except Opera (12), which actually momentarily hides the header until you hover over it or scroll. Is there a way I can offset the anchor target so that the heading (Beef stroganoff recipe, in this case) always appears below the header and isn’t hidden by it. I guess in theory that means offsetting it by 115px (the height of the header). I need to be able to do this with one universal style or script rather than individually styling each anchor as it is a WordPress site and my client will be adding the content. Can you help please? Many thanks.