我有一门关于CSS的课:
.mgmtError{
width:716px;
float:left;
background-color:#FF0000;
padding:10px;
text-align:center;
}
我想给背景上色,不要放在填充区. 我try 了一下保证金,但似乎IE有一些问题.
还有其他解决方案吗?
我有一门关于CSS的课:
.mgmtError{
width:716px;
float:left;
background-color:#FF0000;
padding:10px;
text-align:center;
}
我想给背景上色,不要放在填充区. 我try 了一下保证金,但似乎IE有一些问题.
还有其他解决方案吗?
如果您能够访问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>