The top value is not valid and does not work unless the position:absolute; top value is set

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <meta charset="utf-8" />
    <style type="text/css">
 
        -sharpdiv1{
            height:300px;
            width:300px;
            background-color:red;
            top:100px;
            left:100px;
        }
    </style>
</head>
<body>
    <div id="div1"></div>
    <div id="div2"></div>
    <!--idclass-->
</body>
</html>
reason: the top attribute specifies the top edge of the element. This attribute defines the offset between the upper outer margin boundary of an positioning element and the upper boundary of its containing block. If the value of the "position" property is "static", setting the "top" property has no effect.
Why?
Css
Mar.28,2021

relative, absolute, fixed takes effect only if, top left right bottom is located; static is not positioned.


only elements that are detached from the document stream will take effect, fixed absolute relative

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35c3b-2bfb0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35c3b-2bfb0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?