Project: Positioning and Floating Elements

Introduction

The New York Times has been a leader in experimenting with the inclusion of multimedia content in traditional stories. That creates all kinds of interesting position questions.

In this project, your assignment is to copy this article from the New York Times(open in an “incognito” window without cookies to view it if you’re over your monthly limit). Notice how the section titled “The Theory of Inflation” (you may need to widen your viewing window for it to show up) is laid out.

Assignment

Note: As usual, ignore any ads, comments or interactive elements (which use Javascript) and don’t worry about what happens when you change the page width (they use some media queries to rearrange things). Focus on making it look similar.

  1. Go to the NYT article in question and have a look around.
  2. Follow the instructions atop the Google Homepage project to set up a Github repository for this project (of course you’ll need to change the title).
  3. Create a new HTML document.
  4. Think about all the elements on the page and how they are grouped together.
  5. Lay out the basic structure of the page using empty semantic HTML elements that are appropriately sized and positioned. You may want to make their background colors different so you can see them. Don’t forget to use your browser’s developer tools (right click on the page, click “inspect element”)!
  6. Set up the top navigation bar (again, don’t worry about making it change when you scroll down the page). How can you get it to stick to the top of the page as you scroll down?
  7. Fill in and position the additional sections. Don’t worry about enclosing every paragraph of text in <p> tags.
  8. Push your solution to Github.

Student Solutions

Send us your solution so we can show others! Submit a link to the Github repo with your files in it by using any of the methods listed on the contributing page. See the Google Homepage project for examples.

Additional Resources

This section contains helpful links to other content. It isn’t required, so consider it supplemental for if you need to dive deeper into something.

  • Add some!

HTML5 and CSS3

Project: Positioning and Floating Elements

View Course Login to track progress Next Lesson

Got questions?

Chat with our friendly Odin community in our Gitter chatrooms!

Open Gitter

Are you interested in accelerating your web development learning experience?

Get started

Thinkful

  • 5-6 months

    5-6 months

  • Job Guarantee

    Job Guarantee

  • 1-on-1 Mentorship

    1-on-1 Mentorship