How can I replicate this effect? - http://www.katherinejenkins.com
Hello beautiful people. I'm new to this web-site but I love it already. However I'm in the grip of frustration. I'm building a site for a DJ and I want the main body page of the frameset to contain a fixed image at the top that stays exactly where it is even when you scroll the page, yet which remains within the page itself, parallell to the top of the scroll bar.
As you can see the decorative metal section at the top of the main body section is above the rest of the page. I know how to do that, it's simply the positioning it adopts. I just can't crack it.
Well the code you posted worked fine, so I'm not sure what the problem was. However, I've just got a few pointers.
Always use a DOCTYPE, it puts the browsers into standards compliance mode, which is far better than quirks mode (especially in the case of IE).
Generally all styles go in the head section of the page, though I guess there's nothing to stop you putting them in the body section.
If you only have one image that you want to stay at the top of the page then you may aswell use the first example I posted, and set it as the background to the body element.
This point is key, always run your code through the W3C markup validator, if you've got any errors then it's definately worth fixing them.
Also, what I didn't mention earlier is that if you don't want the content to over-lap the image, you can specify some top-padding.
Every fight is a food fight when you’re a cannibal.
Bookmarks