Find out the advantages of using a CSS framework such as Bootstrap over manually designing grids.
<div class=“row”>
<div class=“column1”></div>
<div class=“column2”></div>
</div>
pc_about_txt.html
file from the html03 > tutorial folder. Enter your name and the date in the comment section and save the file as pc_about.html
.Anne has already added the same header used for the Pandaisia Chocolates home page to this page. Using the same header tags keeps a consistent header for each page and, therefore, a consistent look and feel across pages in the website.
</header>
tag, insert the following div
elements for the first row in the grid.<div class=”row”>
</div>
<div class=”row”>
<div class=”col-2-3”>
<div class=”row”>
<div class=”col-1-2”>
</div>
<div class=”col-1-2”>
</div>
</div>
<div class=”row”>
<div class=”col-1-2”>
</div>
<div class=”col-1-2”>
</div>
</div>
</div>
<div class=”col-1-3”>
</div>
</div>
<div class=”row”>
</div>
What are your views on lorem ipsum and if it is important to use this tool.
pc_grids_txt.css
file from the html03 > tutorial folder. Enter your name and the date in the comment section and save the file as pc_grids.css
.div.row {
clear: both;
}
div.row::after {
clear: both;
content: “”;
display: table;
}
class=“col-numerator-denominator”
where numerator-denominator
provides the fractional width of the columndiv[class^=”col-”] {
float: left;
}
div.col-1-1 {width: 100%;}
div.col-1-2 {width: 50%;}
div.col-1-3 {width: 33.33%;}
div.col-2-3 {width: 66.67%;}
div.col-1-4 {width: 25%;}
div.col-3-4 {width: 75%;}
<div class=”row”>
tag, insert the following h1
heading:<h1>About Pandaisia Chocolates</h1>
pc_text.txt
file using your text editor and copy the HTML code from the About the Company section, which includes the h2
heading, an img
element, and two paragraphs.<div class=”col-2-3”>
tag near the top of the grid.Within the left column are two nested rows containing short articles about chocolate. You will add this content to the grid now.
<div class=”row”>
tag, insert the heading tag <h2>About Chocolate</h2>
pc_text.txt
file in your editor and copy the HTML code from the first of four Enjoying Chocolates sections, which includes the h3
heading and a paragraph. Paste the copied text into the first of the four nested half-width columns, as shown in Figure 3-39.pc_text.txt
file in your editor and copying the HTML code from the last three Enjoying Chocolate sections: Healthy Chocolate, Single-Origin and Blends, and Ethical Produce. Each section includes an h3
heading and a paragraph. Paste the copied code from each section into one of the three remaining nested half-width columns. Figure 3-40 shows the placement of the copied HTML code for the last three half-width nested columns.pc_text.txt
file in your editor and copy the aside element and its contents from the Frequently Asked Questions section.pc_about.html
file in your editor and paste the copied code within the right column, as shown in Figure 3-41.<footer>Pandaisia Chocolates ©
2017 All Rights Reserved</footer>
<link href=”pc_reset.css” rel=”stylesheet” />
<link href=”pc_grids.css” rel=”stylesheet” />
<link href=”pc_styles2.css” rel=”stylesheet” />
pc_grids.css
file in your editor.div {
outline: 1px solid red;
}
pc_about.html
file in your browser. selector {
display: grid;
grid-template-rows: track-list;
grid-template-columns: track-list;
}
grid-template-columns: 200px 250px 1fr 2fr;
grid-row-start: integer;
grid-row-end: integer;
grid-column-start: integer;
grid-column-end: integer;
where integer
defines the starting and ending row or column that contains the content