Home > Blockchain >  Setting an HTML page to a fixed resolution
Setting an HTML page to a fixed resolution

Time:12-06

I'm displaying an HTML overlay on a 1920x1080 stream. Im trying to create a simple HTML page that has a centered image that shows on top but whenever i display it it's somewhere on the bottom right side. This is my code, I rather not use CSS if that's an option What am i missing?

<!DOCTYPE html>
<html lang="en">
<head>
</head>

<body>
  <center>
<img src="https://s10.gifyu.com/images/once-30-sec-5-min-99.gif" alt="Computer man" style="width:400px;height:100px;padding-bottom: 350;padding-right: 200px">
  </center>

<script>
</script>

</body>
</html>

CodePudding user response:

I don't think you can create a fixed resolution only using HTML but you can put styles in the HTML image tag with maximum height and with instead of linking it to a CSS page

<!DOCTYPE html>
<html lang="en">
  <head>
   <meta charset="UTF-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="width=device-width, initial- scale=1.0">
   <title>Document</title>
  </head>
   
  <body>
     <img href="address of image" style="width=100%; height:100%"> 
  </body>
</html>
<iframe name="sif1" sandbox="allow-forms allow-modals allow-scripts" frameborder="0"></iframe>

  • Related