<div id="container">
<div id="register"></div>
<div id="roll"></div>
<div id="check"></div>
</div>
The structure of div is very simple. If you do not specify a fixed px for the sub-div, the sub-div can be written at 20%.
now there are three requirements
the width of the 1.div-sharpcontainer is the same as the width of the sub-div.
2.div-sharpcontainer is centered relative to document
3.div is 20% of document.
div-sharpcontainer{
border:1px solid red;
margin:0 auto;
}
div-sharpregister,div-sharproll,div-sharpcheck{
border:1px solid black;
width:20%;
text-align:center;
}
the above cannot be done. Excuse me, how to write css?