css - How can I apply clear both to wrap inside elemets in my container -


how can apply clear both wrap inside elemets in container

jsfddile

.container{      background:blue;  } .box{     float:left;     width:75px;     height:75px;     margin:5px 5px;     background:red;  }  .box:after{     clear:both; } 

i want boxes warpped container! thanks

you can way:

fiddle

.container:after{     clear:both;     content: " ";     display: block;      } 

or

remove float , use display: inline-block

fiddle

.box{         width:75px;     height:75px;     margin:5px 5px;     background:red;     display: inline-block; } 

Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -