Div ain’t workin

ain’t working idk why but i need help

Hey @ChaseClift welcome to the forums.

Can you please elaborate on your problem and share your code or a link to your repl?

<!DOCTYPE html>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <link href="style.css" rel="stylesheet" type="text/css" />

 <center<div class="w3-light-grey">
  <div id="myBar" class="myDiv" style="width:20%">20%</div>
<button class="w3-button w3-green" onload="move()">Load</button> 

function move() {
  var elem = document.getElementById("myBar");   
  var width = 20;
  var id = setInterval(frame, 10);
  function frame() {
    if (width >= 100) {
    } else {
      elem.style.width = width + '%'; 
      elem.innerHTML = width * 1  + '%';



  <script src="script.js"></script>

  This script places a badge on your repl's full-browser view back to your repl's cover
  page. Try various colors for the theme: dark, light, red, orange, yellow, lime, green,
  teal, blue, blurple, magenta, pink!
 <!-- <script src="https://replit.com/public/js/replit-badge.js" theme="blue" defer></script> -->


I think because the opening center tag does not have > at the end of it. Also, the center tag has been deprecated and may not be supported in all broswers

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.