CSS CSS Layout Basics CSS Layout Project Column Layout with Media Queries

jiwan gurung
jiwan gurung
4,248 Points

what do you need to do to make the column float left and right?

my columns are not floating side to side.whats the main code to float it side by side?

1 Answer

dragos busuioc
dragos busuioc
24,131 Points

first,the width of boths divs,together must be 100%.Because div is a block element,by default the width is 100%.So you have to change the width to,let's say 45% for both divs.So you have 90%.And remain 10% for margins. Then you have to float to left the first div. firstDiv { float-left; }