From the course: Responsive Layout
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Solution: Floats to flexbox - HTML Tutorial
From the course: Responsive Layout
Solution: Floats to flexbox
(jingle) - [Instructor] For this challenge, your job was to take a fixed width website that was laid out using floats, and write new CSS to create a responsive website using flexbox. The first thing we're gonna do is open the file again in a separate browser tap. This way, we have our working page, but we can also load back and look at the original if we need to remember what it looks like. Next, we're going to go into the CSS that's in our HTML file starting with line nine and delete all of the CSS, because we're not going to need any of it. So, I've deleted everything between the two style tags right here. Normally, when we're laying out a webpage, we would start from the narrow layout first, as it's usually easier, but for this, since we're recreating an existing layout for the wide viewports, we're going to start with that one first. So, I'm going to save, and then go here and refresh. So now, I don't have any layout styles on the page. Looking at the page, it seems like the best…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
Defining a flexbox container1m 53s
-
(Locked)
Direction3m 36s
-
(Locked)
Wrapping2m 30s
-
(Locked)
Ordering flex items1m 28s
-
(Locked)
Flexbox alignment overview1m 39s
-
(Locked)
Aligning items on main axis3m 16s
-
(Locked)
Aligning items on cross axis3m 35s
-
(Locked)
Aligning lines on cross axis3m 15s
-
(Locked)
Aligning individual flex items1m 38s
-
(Locked)
Distributing space to flex items4m 43s
-
(Locked)
Challenge: Floats to flexbox1m 21s
-
(Locked)
Solution: Floats to flexbox8m 17s
-
-
-