I came across the following website and being pretty new to CSS, I was just wondering if anyone could suggest how the background image is fixed, and regardless of how I resize the browser window, I don't get any vertical or horizontal scrollbars.


I want to achieve this same effect so there is always more background image to show if the user increases their viewport, but I don't want scrollbars if all the actual main page text is within the viewport. At the moment, if I set a really large background image (without having it resize with the browser) I get scrollbars.


2 answers

Mark 15

You shouldn't get scrollbars if you're using CSS and not an HTML <img> tag.


Answered almost 9 years ago by Mark

He's using inline styles so you don't need any suggestions to view his source and see exactly how he did it.

Answered almost 9 years ago by Nathan Duran