Question

In: Computer Science

Debug3-4.css You’ve been given the initial HTML and CSS code for this web page, but there...

Debug3-4.css You’ve been given the initial HTML and CSS code for this web page, but there are several errors in the CSS stylesheet. Use your knowledge of CSS to locate and fix the errors. The body element should have a width that is 90% of the width of the browser window ranging from a minimum of 600 pixels up to a maximum of 1024 pixels. Fix the syntax errors in the body style rule that defines the width of the web page. The style rule for the body element sets up a grid layout for the page. However, there are several errors in defining the grid areas, grid columns, and grid gaps. Fix the syntax errors in the style rule.

There are issues with grid column styles globally in debug3-4.css.

Go to the style rules in the "Grid Areas" section that assigns page elements to areas of the grid. Locate and fix the errors in assigning elements to grid areas. The style rules for the horizontal navigation list and the section element also define grid styles for those elements. Locate and fix errors in the code that set up the grid columns. The last paragraph within the section div selector should be placed with absolute positioning 1 pixel and 5 pixels from the bottom right corner of the container element. However, there is an error in defining the selector. Find and fix the error.

@charset "utf-8"; /* New Perspectives on HTML5 and CSS3, 8th Edition Tutorial 3 Coding Challenge 4 Author: Matthew Arigoni Date: 10/06/2020 Filename: debug3-4.css */ /* Page Body Styles */ body { width: 90%; min: 600px; max: 1024px; margin: 10px auto; display: grid; grid-template-columns: 200px auto 200px; grid-template-areas: "header header header"; "link link link"; "nav main side"; "nav coupons side"; "footer footer footer"; grid-gap: 10px/25px; } /* Grid Areas */ header {grid-area: headers;} nav.horizontal {grid-area: links;} nav.vertical {grid-area: navs;} article {grid-area: main;} section {grid-area: coupons;} aside {grid-area: sides;} footer {grid-area: footers;} /* Image Styles */ header img { display: block; width: 100%; } /* Horizontal Navigation List Styles */ nav.horizontal ul { width: 100%; display: grid; grid-columns-template: repeat 5/1fr; } nav.horizontal ul li { display: block; text-align: center; } /* Coupon Section Styles */ section { display: grid; grid-columns-template: repeat 3/1fr; grid-gap: 20px; } section div { outline: 4px dashed gray; position: relative; } section div p.last-of-type { position: absolute; bottom: 1px; right: 5px; }

Solutions

Expert Solution

EXPLANATION:

body {
  width: 90%;
  min-width: 600px;
  max-width: 1024px;
  margin: 10px auto;
  display: grid;
  grid-template-columns: 200px auto 200px;
  grid-template-areas: "headers headers headers";
  grid-template-areas: "links links links";
  grid-template-areas: "navs main sides";
  grid-template-areas: "navs coupons sides";
  grid-template-areas: "footers footers footers";
  grid-gap: 10px 25px;
}

/* Grid Areas */

header {
  grid-area: headers;
}

nav.horizontal {
  grid-area: links;
}

nav.vertical {
  grid-area: navs;
}

article {
  grid-area: main;
}

section {
  grid-area: coupons;
}

aside {
  grid-area: sides;
}

footer {
  grid-area: footers;
}

/* Image Styles */

header img {
  display: block;
  width: 100%;
}

/* Horizontal Navigation List Styles */

nav.horizontal ul {
  width: 100%;
  display: grid;
  grid-template-columns: repeat (5, 1fr);
}

nav.horizontal ul li {
  display: block;
  text-align: center;
}

/* Coupon Section Styles */

section {
  display: grid;
  grid-template-columns: repeat (3, 1fr);
  grid-gap: 20px;
}

section div {
  outline: 4px dashed gray;
  position: relative;
}

section div p:last-of-type {
  position: absolute;
  bottom: 1px;
  right: 5px;
}

Here, I have made all the necessary corrections in the given code.

THANKS,

FEEL FREE TO POST COMMENTS AND PLEASE UPVOTE THE ANSWER.


Related Solutions

Develop a personal web page for yourself using HTML, CSS, and Javascript Use the following HTML...
Develop a personal web page for yourself using HTML, CSS, and Javascript Use the following HTML tags to design your webpage: <h1>...</h1>,<h3>...</h3>, <h6>...</h6>, <p>...</p>, <b>...</b>, <i>...</i>, <a>...</a>, <img...>, <table>... </table>, <div>...</div>, <form>...</form>, <input type="text">, and <input type= "submit"> Use an external css to change the default style of your webpage. You must use at least one element selector, one id selector, and one class selector Using text input and submit button, allow the user to change the background color of...
use CSS, java and HTML to make a charity admin page. It's a web page after...
use CSS, java and HTML to make a charity admin page. It's a web page after you log in to your account. I can have personal information, the amount of money donated, the children who have received charity, and some blogs. In fact, all the things are what I want. But you are free to do whatever You like, even if you don't say what I say. I just need a charity Admin page for charity User.Don't ask me for...
use CSS, java and HTML to make a charity admin page. It's a web page after...
use CSS, java and HTML to make a charity admin page. It's a web page after you log in to your account. I can have personal information, the amount of money donated, the children who have received charity, and some blogs. In fact, all the things are what I want. But you are free to do whatever You like, even if you don't say what I say. I just need a charity Admin page for charity User.Don't ask me for...
use CSS, java and HTML to make a charity admin page. It's a web page after...
use CSS, java and HTML to make a charity admin page. It's a web page after you log in to your account. I can have personal information, the amount of money donated, the children who have received charity, and some blogs. In fact, all the things are what I want. But you are free to do whatever You like, even if you don't say what I say. I just need a charity Admin page for charity User.Don't ask me for...
use CSS, java and HTML to make a charity admin page. It's a web page after...
use CSS, java and HTML to make a charity admin page. It's a web page after you log in to your account. I can have personal information, the amount of money donated, the children who have received charity, and some blogs. In fact, all the things are what I want. But you are free to do whatever You like, even if you don't say what I say. I just need a charity Admin page for charity User.Don't ask me for...
use CSS, java and HTML to make a charity admin page. It's a web page after...
use CSS, java and HTML to make a charity admin page. It's a web page after you log in to your account. I can have personal information, the amount of money donated, the children who have received charity, and some blogs. In fact, all the things are what I want. But you are free to do whatever You like, even if you don't say what I say. I just need a charity Admin page for charity User.Don't ask me for...
use CSS, java and HTML to make a charity admin page. It's a web page after...
use CSS, java and HTML to make a charity admin page. It's a web page after you log in to your account. I can have personal information, the amount of money donated, the children who have received charity, and some blogs. In fact, all the things are what I want. But you are free to do whatever You like, even if you don't say what I say. I just need a charity Admin page for charity User.Don't ask me for...
Create a Web Page Using HTML, CSS, JS, jQuery • Create a web profile, including any...
Create a Web Page Using HTML, CSS, JS, jQuery • Create a web profile, including any of the following: • Your hobbies, likes/dislikes, career aspirations, dream job, favorite animals/ pets, favorite superhero, etc. • You do not have to share personal information that you are uncomfortable with sharing. Follow these guidelines when creating your page: • Include at least one heading (h1, h2, etc.) in your web page. • Provide a quote from a book, movie, etc. • Include at...
write php code for buying and selling web using sql, javascript ,html ,css style
write php code for buying and selling web using sql, javascript ,html ,css style
Create 1 HTML page and 1 CSS file for all the styles. Your html page will...
Create 1 HTML page and 1 CSS file for all the styles. Your html page will be a small gallery of images using the Polaroid style. The page should have at least 1 row of 3 images. You can choose any theme of images. Don't pick random images, make them all have a theme. Add an h1 tag for the header of your page. Style the h1 tag with a color, size, and font family. Include a paragraph tag under...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT