Posted On April 4, 2019

Basic CSS: Add a Negative Margin to an Element

kimconnect 0 comments
blog.KimConnect.com >> Codes >> Basic CSS: Add a Negative Margin to an Element
<style>
.injected-text {
margin-bottom: -25px;
text-align: center;
}

.box {
border-style: solid;
border-color: black;
border-width: 5px;
text-align: center;
}

.yellow-box {
background-color: yellow;
padding: 10px;
}

.red-box {
background-color: crimson;
color: #fff;
padding: 20px;
margin: -15px;
}

.blue-box {
background-color: blue;
color: #fff;
padding: 20px;
margin: 20px;
}
</style>

<div class="box yellow-box">
<h5 class="box red-box">padding</h5>
<h5 class="box blue-box">padding</h5>
</div>

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

PowerShell: Optimize SQL Server Memory & CPU Resources

# optimizeSqlServer.ps1 # Version 0.0.2 # This version deals with Memory, CPU # Future versions…

How to Enable GPUPDATE When Connected via OpenVPN Client

// Explanation: to prevent locking of processes, we set a proxy batch file (on_connect.bat) to…

PowerShell: Restore SQL Database from Full and/or Differential Backups

$databaseName='BALOO_MSCRM' $newDatabaseName='BALOO_MSCRM' $dbData='mscrm' # set this value to $null for autogen defaults $dbLog='mscrm_log' # set…