CSS CSS Layout Basics Page Layout with the Float Property The Float Challenge Solution

Sandeep Krishnan
Sandeep Krishnan
9,730 Points

I tired it this way - I ignore the col ( class). I got the same result...Did i do anything wrong ?

.primary { width: 50%; float: left; padding: 20px; } .secondary{ width:50%; float: left; padding: 20px; }

Ronnelle Torres
Ronnelle Torres
5,958 Points

What's the project about? It seems that the col class was added so that you don't have to repeat yourself. Instead of writing the class declarations for both element with the class primary and secondary.. You can just add the class col for both element. I think there's nothing wrong with what you dd but it's best to practice DRY. :)