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.

http://mdin.es/es/home

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.

Thanks...

2 answers

Mark 15
1
point

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

http://www.w3schools.com/css/tryit.asp?filename=trycss_background-image
http://www.w3schools.com/css/css_background.asp

Answered almost 9 years ago by Mark
0
points

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