I am working on a project that monitors my school's greenhouse. I want the webpage to have a background that is of an image. I have partly achieved this as the image is copied enough to fill the screen. I want the image to be stretched so that it fills the page. No matter what I code, it still multiplies itself.
I am using an Ethernet shield atop of an Arduino Uno. Here is the line of code that I am using to insert the background image:
<html>
<style>
body {
background-image: url('https://theselfsufficientliving.com/wp-content/uploads/2013/10/medinal-plants-gardenening-640x3601.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
background-size: 100% 100%;
}
</style>
<body>
<h2>Background Stretch</h2>
<p>Set the background-size property to "100% 100%r" and the background image will be stretched to cover the entire element, in this case the BODY element.</p>
</body>
</html>
If you copy it into a .html file and look at in a browser, it appears to do what you want.
I found it here and adapted it for your picture: HTML Background Images
zoomkat:
"Incidentally, in order to avoid a whole lot of escape characters in a such a string, you can use the C++ raw string literal. See, for example: abseil / Tip of the Week #64: Raw String Literals"
I've found with html you can substitute the ' single quote for the " double quote and escaping is not required.
Yeah this HTML embedded in Arduino IDE is confusing the hell out of me a little bit.
"Yeah this HTML embedded in Arduino IDE is confusing the hell out of me a little bit."
One more thing that can help memory issues and possibly quicker upload time is to bundle the code in an F() macro that is sent in a single client.print operation like below.