How To Background A Div Without The Padding Area
I have this class on CSS : .mgmtError{ width:716px; float:left; background-color:#FF0000; padding:10px; text-align:center; } and I'd like to color the background n
Solution 1:
You can use
background-clip: content-box;
Also make sure to use background-color
property, not background
.
Solution 2:
If you are able to access the HTML try:
.mgmtError {
width: 716px;
float: left;
padding: 10px;
text-align: center;
background-color: blue;
}
.mgmtError div {
background-color: #FF0000;
}
<div class="mgmtError">
<div>Content</div>
</div>
Post a Comment for "How To Background A Div Without The Padding Area"