Website Development Prices

Search Blog

Wednesday, December 9, 2020

How to move a div element?

How to move to the right div element or any other element.

Solution: add block property.

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>css Tips and Tricks</title>
      <link href="css/style.css" rel="stylesheet" />
  </head>
  <body>
    <div id="div1">Center this sentence.</div>
  </body>
</html>

Save this file as, for example, css-tricks.html, in your css-tricks folder.