In this exercise, you will create and modify style rules to learn more about how to place elements on a page using positions. An example of page element positions is shown in Figure 5-66.   Figure 5-66   Grading Complete each task listed in this lab. Each task contains automated checks which are used to calculate your grade. You can use the Website Refresh button to refresh your website preview at any point. You can view a full-page version of your website by clicking the arrow in the top right corner of your website preview. When you have completed each task by clicking the checkbox, open the task list panel on the left navigation bar and click the "Submit" button. Perform the following tasks: Tasks   Open index.html file and update the comment with your name (firstname lastname), the file name, and today’s date (MM/DD/YYYY). Open index.html in your browser to view the file. Add the text, CH 5 Extend Your Knowledge, to the title element. 4   Open the styles.css file and locate the "sticky” comment and create a style rule for the sticky class selector with the following rules: Add a declaration for the position property with a value of -webkit-sticky. Add a declaration for the position property with a value of sticky. Add a declaration for the top property and specify a 0 value. Refresh your page, and scroll down to view the changes. In the index.html file, use the empty paragraph element within the sticky div element to briefly explain how to use the sticky position. 1   In the styles.css file, locate the “relative” comment and create a style rule for the relative class selector with the following declarations: Add a declaration for the position property with a value of relative. Add another declaration for the top property and specify a value of 90px. Add another declaration for the left property with a value of 30px Refresh your page, and scroll down to view the changes. In the index.html file, use the empty paragraph element within the relative div element to explain how the style rules affected the relative box. 1   In the styles.css file, locate the “fixed” comment and create a style rule for the fixed class selector with the following declarations: Add a declaration for the position property with a value of fixed. Add another declaration for the top property and specify a value of 90px. Add another declaration for the right property with a value of 10px. Refresh your page, and scroll down to view the changes. In the index.html file, use the empty paragraph element within the fixed div element to explain how the style rules affected the fixed box. 1   In the styles.css file, locate the “absolute” comment and create a style rule for the absolute class selector with the following declarations: Add a declaration for the position property with a value of absolute. Add another declaration for the bottom property and specify a 0 value. Add another declaration for the right property and specify a 0 value. Refresh your page, and scroll down to view the changes. In the index.html file, use the empty paragraph element within the absolute div element to explain how the style rules affected the absolute box.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

In this exercise, you will create and modify style rules to learn more about how to place elements on a page using positions. An example of page element positions is shown in Figure 5-66.

 

Figure 5-66

 

Grading

Complete each task listed in this lab. Each task contains automated checks which are used to calculate your grade. You can use the Website Refresh button to refresh your website preview at any point. You can view a full-page version of your website by clicking the arrow in the top right corner of your website preview. When you have completed each task by clicking the checkbox, open the task list panel on the left navigation bar and click the "Submit" button.

Perform the following tasks:

Tasks
 

Open index.html file and update the comment with your name (firstname lastname), the file name, and today’s date (MM/DD/YYYY). Open index.html in your browser to view the file.

Add the text, CH 5 Extend Your Knowledge, to the title element.

4
 

Open the styles.css file and locate the "sticky” comment and create a style rule for the sticky class selector with the following rules:

  • Add a declaration for the position property with a value of -webkit-sticky.
  • Add a declaration for the position property with a value of sticky.
  • Add a declaration for the top property and specify a 0 value.

Refresh your page, and scroll down to view the changes. In the index.html file, use the empty paragraph element within the sticky div element to briefly explain how to use the sticky position.

1
 

In the styles.css file, locate the “relative” comment and create a style rule for the relative class selector with the following declarations:

  • Add a declaration for the position property with a value of relative.
  • Add another declaration for the top property and specify a value of 90px.
  • Add another declaration for the left property with a value of 30px

Refresh your page, and scroll down to view the changes. In the index.html file, use the empty paragraph element within the relative div element to explain how the style rules affected the relative box.

1
 

In the styles.css file, locate the “fixed” comment and create a style rule for the fixed class selector with the following declarations:

  • Add a declaration for the position property with a value of fixed.
  • Add another declaration for the top property and specify a value of 90px.
  • Add another declaration for the right property with a value of 10px.

Refresh your page, and scroll down to view the changes. In the index.html file, use the empty paragraph element within the fixed div element to explain how the style rules affected the fixed box.

1
 

In the styles.css file, locate the “absolute” comment and create a style rule for the absolute class selector with the following declarations:

  • Add a declaration for the position property with a value of absolute.
  • Add another declaration for the bottom property and specify a 0 value.
  • Add another declaration for the right property and specify a 0 value.

Refresh your page, and scroll down to view the changes. In the index.html file, use the empty paragraph element within the absolute div element to explain how the style rules affected the absolute box.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Hyperlinks
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education