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

James Barrett
James Barrett
13,252 Points

My solution; are there any problems?

Hi there,

Below is my code for this challenge:

 .secondary {
    width: 40%; 
    float: left;
  }

  .primary {
    width: 60%;
    float: right;
  }

.col {
       padding-right: 1em;
       padding-left: 1em;
   }

Are there any problems approaching the floats this way as apposed to Guil's?

It seems ok, just wanted to see if this actually feasible in other projects.

Thanks, James.

2 Answers

Bryce Santos
Bryce Santos
11,143 Points

Nope! Your way is just a different way of doing it and for this particular project, it works.

Sandeep Krishnan
Sandeep Krishnan
9,730 Points

I did it the same way...

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