[Snippet] CSS3 Keep ratio for background
Posted: 20 Dec 2011, 21:17
Author : FTH
Description : Keep the ratio (width/height) for background (only for browsers supported CSS3)
Example :
You want to add an image to your background on your board... Upload a large image (2560*1600 for my example)
Open file
Find :
Replace with :
Change "your_image.jpg" by your image !!!
Description : Keep the ratio (width/height) for background (only for browsers supported CSS3)
Example :
You want to add an image to your background on your board... Upload a large image (2560*1600 for my example)
Open file
styles/prosilver/theme/colours.css
Find :
Code: Select all
html, body {
color: #536482;
background-color: #FFFFFF;
}
Code: Select all
html, body {
color: #536482;
background-color: #FFFFFF;
background-size: cover;
background-position: center center;
background-image: url("{T_THEME_PATH}/images/your_image.jpg");
background-repeat: no-repeat;
background-attachment: fixed;
}