VSD - stationary background?

User 177580 Photo


Registered User
15 posts

Is there a way in VSD to make the background image stationary?
User 244141 Photo


Ambassador
1,209 posts

Hi,

Insert into the head:

<style type="text/css">
body{
background-image:url('yourgraphic.jpg');
background-repeat: repeat;
background-attachment:fixed
}
</style>

This tiles your background and makes it stationary. I use it on some of my sites...
Web Design: https://www.websnoogie.com
Member - BBB: Websnoogie, LLC






User 355448 Photo


Ambassador
3,144 posts

With a larger image such as a logo that you want centered in the window of the browser, you can use something similar to what Rod posted.

background-image: url('logo.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center center;

This will put logo.jpg in the center of the browser window.
User 177580 Photo


Registered User
15 posts

Thanks! I'll try it out today.

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.