Image override background fill - Post...

User 2156725 Photo


Registered User
1 post

Question.
When using a background image, and the background fill.
Then resizing, how can you get the image to override the background fill?
User 122279 Photo


Senior Advisor
14,649 posts

Try this bit of css:

html {
background: url(images/picture.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}

Of course you have to replace 'images/picture.jpg' with the name and path for your image.

This will work in all major browsers, but as for IE only from version 9.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 496244 Photo


Registered User
13 posts

Hi - Does this CSS get entered via Tools>Add HTML? If yes, does the image need to get entered separtely as a "reference file" as instructed by the popup window? Will "preview" allow to view or does all need to be uploaded to the host in order to view? VSD newbie - Thank you!
User 187934 Photo


Senior Advisor
20,271 posts

Try this page.
Stationary background in VSD.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.