Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Practice CSS Floats!
You have completed Practice CSS Floats!
Preview
Follow along to see how to lay out the web page using CSS floats.
Provide feedback
We're looking for feedback on this new type of practice workshop. When you're finished, could you please review the workshop by filling out this short form? :)
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
and then try to recreate it yourself.
0:00
Now let's go over this solution.
0:01
You can also reference this code
when you download the project files.
0:03
So first up, I applied a float
to LI tags inside nav using
0:06
a descendant selector that targets
LI elements inside the nav element.
0:10
Then I use the float property
to float the list items left,
0:15
which makes the floats follow the HTML
source order from left to right.
0:18
Next, I created a CSS rule that
targets the class image featured,
0:24
and set the float value to right.
0:29
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up