Skip to content

mohawk-responsive-ui-frameworks/layout-grid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exercise 2: Responsive Layout Grid

In class exercise to get familiar with Bootstrap's responsive grid. Use the official Bootstrap documentation as a reference while working through this lab. Take some time now to read through its introduction and How it works section.

Learning how to use Bootstrap's responsive grid will greatly ease the development of responsive layouts, allowing you to develop UIs that look great on devices ranging from mobile phones to desktop computers.



Tutorial

No CSS or custom styles even through HTML's style attribute are to be written to finish this exercise.

Equal-width Columns

All three elements should have equal widths and appear on the same line regardless of viewport width.

Set Columns Width

  • The first and last elements should be variable width like the last row.
  • The second element should have a grid column width of 3.
  • The third element should have a grid column width of 7.

Breakpoint Specific

All columns should span:

  • 12 grid columns for the xs breakpoint.
  • 6 grid columns for the sm breakpoint.
  • 4 grid columns for the md breakpoint.
  • 3 grid columns for the lg and xl breakpoints.

Alignment

Row #1

  • All columns should be:
    • Of equal width
    • Vertically centered

Row #2

  • All columns should be of equal width.
  • The first column should be vertically aligned to the bottom.
  • The last column should be vertically centered.

Row #3

  • All columns should have equal spacing between themselves but span from both ends of the container.
  • All columns should have the xs breakpoint sized to be 3 grid columns.

Row #4

  • All columns should have equal spacing between themselves and have equal spacing around each element, not between each element.
  • The first and last column should have 4 grid columns in width for the md breakpoint (same as row #4).

If you're suck refer to this section of the documentation.

Nesting

Create these elements in the order they're listed.

  1. Create a <h1> element:
    1. Must always span full width of row
  2. Create two <div>:
    1. Both must span full width of row for the xs breakpoint
    2. Both must span half the width of the row for all other breakpoints
    3. First <div>:
      1. Has the HTML class fun-facts
      2. Contains four equal sized columns that are vertically aligned
      3. In each column add a <p> element with a fun fact about yourself.
    4. Second <div>:
      1. Has the HTML class fun-fibs
      2. Contains four unequal sized columns that do not span the whole width of the row
        1. Vertically align each one differently
      3. Have equal spacing around them horizontally. The columns can be any width, but no two can be the same
      4. In each column add a <p> element with lies about yourself.

Exercise

  1. Is valid HTML5 document (5 marks)
  2. All grids must:
    1. Container element is direct child of <main> or <body> elements (2 marks)
    2. Row has a direct parent of <section class=”container”> (can be a div) (2 marks)
    3. Row has a direct parent of <section class=”container”> (can be a div) (2 marks)
  3. Row is a direct child of the container (2 marks)
  4. Grid #1:
    1. All cells are full column width for xs breakpoint (2 marks)
    2. Has two cells with class col-md-6 (2 marks)
    3. Each cell has an image with the class img-fluid (2 marks)
  5. Grid #2:
    1. All cells are full column width for xs breakpoint (2 marks)
    2. Has four cells with col-md-6 and col-md-3 (4 marks)
    3. Each cell has an image with the class img-fluid (2 marks)

About

Exercise #2: Layout Grid

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published