* { margin:0; padding:0; } .com { cursor:pointer; width:400px; background:burlywood; margin:0 auto; } .com li { list-style:none; width:100px; height:100px; background:black; color:white; text-align:center; line-height:50px; float:left; margin-left:20px; margin-top:20px; } .box1 { width:380px; margin:auto; background:mistyrose; } ul { width:380px; height:510px; background:lightgoldenrodyellow; margin:auto; } .p1 { font-size:23px; } .com ul .li1 { background:white; color:red; }