<head>
<style>
.first {
    padding-left: 50px;
    padding-right: 25px;
    height: 50px;
    margin: 20px;
}

.second {
    padding-left: 25px;
    padding-right: 50px;
    height: 50px;
    margin: 20px;
}

.inner {
    width: 50px;
    height: 50px;
    background-color: blue;
}

div {
    display: inline-block;
    background-color: green;
}
</style>
</head>
<body>
    <div class="first"><div class="inner"></div></div>
    <div class="second"><div class="inner"></div></div>
</body>
</html>