Join Chris Converse for an in-depth discussion in this video Clearing floats with pseudo-elements, part of Creating a Responsive Web Design.
- Now, if we look at how these three individual elements…are rendering in the browser,…these three asides inside of our section.main area,…it's hard to understand why the Creating a modern atmosphere…div is up next to this content here.…And the issue is that each one of these asides…has a float property.…So, don't follow along here.…I want to add some HTML content here…just to show you what's going on,…but I don't want you to add this to your project.…So, back inside the HTML file, I'm going to find the section…with a class of main.…I'm going to add a paragraph element inside of here,…and I'm just going to type in…I'm inside the main section.…
Then, I'll go back to my CSS file.…I'm going to find section.main here,…and I'm temporarily going to put in a background color.…So, type background-color,…and I'll just put in a light gray.…So, with those in place,…I'll come back to the browser,…and I'll hit reload.…So, here's what we're going to see.…The main section is only as tall now…as that particular paragraph element…
The exercise files for this course are free to all members. Download them and start creating your own responsive websites today.
- Planning your layout
- Creating HTML containers, content, and links
- Creating and styling the layout with CSS
- Creating a menu system
- Styling headings, body text, and footers
- Styling and repositioning navigation links
- Swapping high-resolution graphics for Retina displays
- Making sure content is printable
Skill Level Beginner
Building a Responsive Portfolio Sitewith Justin Seeley1h 47m Intermediate
Design the Web: Responsive SVG Imageswith Chris Converse22m 46s Beginner
Creating a Responsive Presentation in HTML5with Justin Putney1h 24m Intermediate
1. Preparing the HTML Content and Structure
2. Creating the Style and Layout with CSS
3. Creating a Menu System with CSS
4. Making Layout Adjustments for Large and Medium Screens
5. Making Adjustments for Small Screens
6. Making Adjustments for the Smallest Screens
7. Making Layout and Content Adjustments for Print
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.