Help with custom CSS, please. Changing the format of the cards.
I made some My Media cards. I wanted vertical format, like movie poster proportions. I compromised to what I’ve attached because I can’t get the CSS code I found to work any better.
The problem is, changing the code for the My Media Cards also changes the proportions of the other cards. So, when I got the cards square, the Next Up previews became square, and the movie posters are cropped narrower. ALSO, if I change proportions to be too tall and narrow, I lose the text below the cards, the text is pushed off the bottom.
I only want to change the My Media cards. Since the cards seem connected, but not the same proportions, I think there must be a way to compensate, and perhaps make the Next Up and Movie poster cards wider and get them back to correct proportions.
This is the code I found online, modified to make it work the best I could. I put this in Branding in the Dashboard:
#indexPage { .cardImageContainer {border-radius: 1em !important; width: 100% !important; height: 100% !important;} .blurhash-canvas {border-radius: 1em !important; width: 100% !important; height: 100% !important;} .cardScalable {border-radius: 1em !important; width: 95% !important; height: 90% !important;} .cardBox {border-radius: 1em !important; width: 90% !important; height: 90% !important;} .overflowBackdropCard {border-radius: 1em !important; width: 80.00mm !important; height: 80.00mm !important;} .cardPadder {border-radius: 1em !important; width: 0 !important; height: 0 !important;} }
For comparison, here it is without any code in the Branding section, with My Media cards cropped at top and bottom, but the other elements correct (the red bar at the top is part of the backdrop image, and just happened to align that way, pay it no mind):

TL:DR - Use the code at the bottom. Or read on to learn the why.
I get the feeling from your post you’re not really familiar with web programming so I’m going to explain super simply. Just know I’m not trying to talk down to you at all. I’ve been told I over explain and it can make people feel like I’m judging them when I’m just trying to make sure you understand. I don’t know what you know or not.
@Forsho@lemmy.ml almost has it @TrackenDaKracken@lemmy.world. The one missing piece is the sections aren’t necessarily named in CSS.
Just to help you understand what we’re talking about and why you’re having the issue.
#indexPageThis is known as a CSS selector. It tells the website where to apply what’s between the ‘{’ ‘}’ to (so the .cardImageContainer and all that). Think of the CSS as paint, and the selector as the location being painted. The paint gets applied to everything under it though, so if you tell the painter just a house address, they’re painting everything; outside siding, kitchen table, basement, everything. If you tell them a house address, upstairs, third door on the right, then it gets only applied to that room. The selector you’re using basically grabs the entire home page, so the same CSS “paint” gets applied to both the “My Media” row and every other row. What you need is a selector that narrows down to just the desired section.
Thankfully, there’s an easy way to find what it is for you. Right click on “My Media”. Select “Inspect”. A window should pop up on the right (or bottom) with a line highlighted that says
My MediaYou need one line above that. It should start with
. You can actually hover your mouse over the different lines in that inspector window and see what the different sections are. These are the “rooms” I talked about for CSS.mine looks like this
That class name is a series of selectors you can use with periods in between. I tested a tiny bit and found you don’t need the
emby-scroller-containerselector but it doesn’t hurt having it. Put it together and you should get the below code to drop into branding.verticalSection.section0 { .cardImageContainer {border-radius: 1em !important; width: 100% !important; height: 100% !important;} .blurhash-canvas {border-radius: 1em !important; width: 100% !important; height: 100% !important;} .cardScalable {border-radius: 1em !important; width: 95% !important; height: 90% !important;} .cardBox {border-radius: 1em !important; width: 90% !important; height: 90% !important;} .overflowBackdropCard {border-radius: 1em !important; width: 80.00mm !important; height: 80.00mm !important;} .cardPadder {border-radius: 1em !important; width: 0 !important; height: 0 !important;} }