ffs
Junior Member
France-based member
Posts: 307
inherit
264704
0
Jun 12, 2022 11:13:10 GMT -8
ffs
France-based member
307
July 2021
frenchforumsurvivor
|
Post by ffs on Oct 2, 2021 8:31:31 GMT -8
My forum banner is 1215px wide and 50px in height and I would like to put an image as a background; is there a shrink-to-fit or enlarge-to-fit code available that allows the banner to show the full image rather than just a right-sized part of it?
This is one image I'm considering, but it's only 612 x 384 px.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Oct 3, 2021 8:53:37 GMT -8
You can resize a background image using CSS Styling, but it will only work in the more recent browsers...
#banner { background-size: cover; }
Will resize an image to cover the entire cell, but, depending on the original width/height ratio, you will lose some of the image.
Or you can stretch the image to fit with...
#banner { background-size: 100% 100%; }
|
|