Custom CSS for webpage card

Hi,

I’m using the webpage-card to display some weather-information and would like to get rid of some page-elements that are blocking the view. I understand that the webpage-card is a simple iFrame, so I guess it’s not possible to use a custom CSS there. Is there any other way to achieve this?

Put in a new file in your www folder (ie. weather.html) and point your iFrame card on the dashboard to this file (ie. /local/weather.html), and then using this code as an example you can play with the file to find the best way to show the card:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Waze</title>
    <style>
        html, body {
            margin: 0;
            padding: 0;
            height: 100%;
            overflow: hidden; /* Prevent scrolling in the body */
        }
        .iframe-container {
            position: relative;
            width: 100%;
            height: 500px; /* Adjust the height as needed */
            overflow: hidden; /* Ensure no scrollbars appear */
        }
        .iframe-container iframe {
            position: absolute;
            top: -100px; /* Adjust the top position to crop the top part */
            left: 0;
            width: 100%;
            height: 700px; /* Adjust this height to ensure the bottom part is also cropped */
            border: none;
        }
    </style>
</head>
<body>
    <div class="iframe-container">
        <iframe src="https://embed.waze.com/iframe?zoom=12&lat=XXXXXX&lon=XXXXXX&ct=livemap"></iframe>
    </div>
</body>
</html>

Thanks, this is definitely helpful. But I’m looking for a way to include a site and apply custom CSS styles, so I can hide certain elements instead of just positioning and cropping the whole page.