The width of the external tag is smaller than that of the internal tag, so how to display it in the internal tag play

the width of the outer tag is smaller than that of the internal tag, so how to display

in the internal tag play?
Css
Mar.10,2021

give the location when the width is fixed:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .main{
            position: relative;
            width: 100px;
            margin: auto;
            height: 100px;
            border: 1px solid -sharpccc;
        }
        .main .child{
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%,-50%);
            width: 200px;
            height: 100px;
            border: 1px solid -sharp333;
        }
    </style>
</head>

   <div class="main">
       <div class="child">

       </div>
   </div>
<body>

</body>
</html>

If the width of

is fixed, the internal tag uses margin-left:-*px, or translateX ()
. If the width is not fixed, use js to calculate the width difference, and use js to control margin-left;

.
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-1b3b6cb-4eef8.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-1b3b6cb-4eef8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?