5.1 Bootstrap 5 - Responsive Web Design

  1. Motivations
    • Try to resize the window http://tru.ca.
    • Doesn't the layout respond to the resizing? Is the horizontal scroll bar used?
    • How to use the same applications over different screen sizes, such as monitors and cell phones?
    • Any good design templates for TRUQA, such as menu and form?
    • Try www.tru.ca. Try to shrink the window narrower and see what happens.
  2. Responsive web design (RWD).

  3. Bootstrap Tutorial
    • Bootstrap is the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first web sites.
    • Bootstrap 3, 4 and 5 have almost identical basic design templates and components. Bootstrap 4 supports more design components, templates, and themes. Bootstrap 5 uses VanillaJS instead of jQuery. This class uses Bootstrap 5.
    • Read all in Bootstrap 5 Tutorial.
    • Read all in Bootstrap Get Started.
      • What is RWD?
      • What does Bootstrap include? Are design templates included?
      • <meta> tag?
      • Typical structure to use Bootstrap
        1. HTML5
        2. <meta> tag
        3. Bootstrap CSS library, Bootstrap JS library
        4. Container - div.container or div.container-fluid class - not nestable
    • Read all in Containers.
    • How to adjust the layout within a container?
      • Read all in Bootstrap Grids.
      • div.col-(|sm|md|lg|xl|xxl)-(1|2|...|12) within div.row
    • Trial 1: Let's try to give good divisions. Two rows, and two columns in the second row in a container.

    • For consistent look and feel, and design templates - There are many topics to read here.
      • Read all in Bootstrap Tables.
      • Trial 2: Let's try to write a responsive table with the hover effect.

      • Read all in Bootstrap Buttons for <a>, <input>, and <button>.
      • Trial 3: Let's try to write a button of info type.

      • Read all in Bootstrap Dropdowns.
      • Trial 4: Let's try to write a drop-down menu for TRUQA.


      • Read all in Bootstrap Collapse.
      • Read all in Bootstrap Navs. Study the last two examples carefully.
      • Read all in Bootstrap Forms.
      • Read all in Bootstrap Inputs.
      • Trial 5: Let's try to write a staked form for SignIn in TRUQA.


      • Read all in Bootstrap Modals. What is an modal window?
      • Trial 6: Let's try to write SignIn in TRUQA.


      • There are many other topics.
  4. Some examples that can be used in TRUQA
  5. Some review questions and learning outcomes
    • Questions for StartPage and MainPage
      • How to use a drop-down menu
      • How to open a modal window with a <button> or a <a>
      • How to use inputs in a form
      • How to use a form in a modal window
      • How to automatically display the SignIn modal window with error messages? You need to trigger a 'click' event on the SignIn menu item, as shown in the above 'SignIn' example.
    • Questions for MainPage
      • How to use a table
      • How to use tabs/pills for menu bars (not drop-down menu)