Hello
I created an application on ESP8266 for a level measurement of a well. An HTML page allows to see the water level, but the font is too small for a comfortable reading. how to enlarge the font of the display of variables. Thanks a lot for your help
2 Answers
Here is the sketch
Start your code hereString getPage(){
String page = "<html lang=fr-FR><head><meta http-equiv='refresh' content='5'/>";
page += "<title>SONDE_NIVEAU_PUITS</title>";
page += "<style> body { background-color: #fffff; font-family: Arial, Helvetica, Sans-Serif; Color: #000088; }</style>";
page += "</head><body><h1>SONDE NIVEAU PUITS 17A </h1>";
page += "<ul><li><h2>distance entre l'eau et la sonde :</h2>";
page += Distance;
page += "<ul><li><h2>Hauteur d'eau :</h2>";
page += Niveau;
page += "<h2> MODIFICATION CONSIGNE</h2>";
page += "<form action='/' method='POST'>";
page += "<ul><li> (CONSIGNE: ";
page += Consigne;
page += ") ";
page += " <INPUT type='radio' name='Consigne' value='1'> MONTER";
page += "<h2></h2>";
page += "<h1><INPUT type='submit' value='Actualiser'></h1>";
page += "</body></html>";
return page;
Hi Marc,
Instead, you should add this meta
directive in the header of the HTML code :
<!doctype html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- then the instructions that were already in the header --> </head> <body> <!-- do not change the contents of the body --> </body> </hmtl>
Of course, if the layout also needs to be adapted to be responsive, you will have to work on the CSS style sheet.
I hope that’s what you wanted.
Regards,
Steph