I am currently attempting to enhance a subreddit theme by resizing an image to its actual size upon upload.
The current code for the logo is:
/* SUBREDDIT LOGO ADDON
----------------------*/
#header .pagename a {
width: 100px;
background: url(%%subredditlogo%%) left center/auto 50px
}
I am aiming to scale the image larger while maintaining its aspect ratio.
Since this is on Reddit, I can only work with the subreddit stylesheet.
I have made some edits and adjustments, seeing some improvements but not achieving the desired full display of the image.
Here is my current code:
/* SUBREDDIT LOGO ADDON
----------------------*/
#header .pagename a {
width: 300px;
background: url(%%subredditlogo%%) left center/auto 300px;
background-size:100% 200%;
background-repeat:no-repeat;
}
While it has resized the width, I am struggling to change the height. I have tried using:
left center/auto 300px;
without success, as well as:
height: 100%;
height: auto;
Simply looking to resolve this issue now.