Assignment 4: Intermediate CSS Layout

Assignment 4: Intermediate CSS Layout

The purpose of this assignment is to advance our CSS layout abilities, as well as try out some other CSS design techniques and tools. In particular, we’ll use background images, grid layouts, embedded icons, and special fonts.

As usual, additional resources are at the end of this document and screenshots are in the starter files!

Task 1: Setup

This time, I’ve provided a starter HTML file for you in the assignment start files. Import this into a new project and open it in your code editor.

Task 2: HTML

Most of the HTML code has been written for you. However, there are a few things you’ll have to do:

  • In the <header>:
    • As you can see from the screenshot, the text “Assignment 4” in the <h1> is a different color from the text “Dog Magazine”. You’ll need to somehow mark up this text so that it can be selected and recolored in the CSS code. Figure out how to do this. (hint: you’ll need to do some research to find a generic container tag that behaves as an inline element.)
    • The tagline “Your Source for Information About Good Dogs” currently is not marked up with any tag. Find an appropriate tag to do this, using this resource: https://www.w3.org/TR/2014/REC-html5-20141028/common-idioms.html – sub- head

Hint: this is a bit of a trick question!

Also give this tag a class with the value “tagline”.

  • In the <main>:
    • As you can see, there are three sections within the <main> element. One section has class=”articles”. Within this section, there are several article previews separated by their headings. (Each article preview contains a short section of text with a link to the full article.)

In HTML, while we use the <section> tag to contain a subsection of the parent document, we use the <article> tag to contain content that could potentially stand on its own outside the context of the parent document. It’s also conventional to use the <article> tag to mark up short previews of articles. (Such as the article teasers we see on the front page of a magazine or news website.)

Your job is to use the <article> tag to complete the mark up in the articles section. Each article preview should be contained inside an <article> element.

  • The other two sections within the <main> element are “Article Archive” and “Our Partners”. These two sections represent content that is peripherally related to the site’s main content, but not the primary focus. You can also see that, in the screenshots, this content has been placed in its own sidebar column on the right side of the page. To mark up content like this, we can use the

<aside> element. Go ahead and implement this element.

  • In the <footer>:
    • In the “Contact” section, the links for the email and telephone number don’t currently have hrefs. Figure out how to add href attributes for email and telephone links. When clicked/tapped, these links should launch the default email client or invoke the mobile device’s telephone functionality, respectively.

Task 3: Icons

There are a few services that provide icons for use on the web; we’re going to use one called

Font Awesome. Sign up for a free account here: https://fontawesome.com/start

(As always, you may use fake information in the interest of maintaining your privacy.)

Once you have your free account, you’ll need to set up a so-called “kit” that you’ll use to apply icons to your site. Create a kit here (click the blue New Kit button): https://fontawesome.com/kits

You will then be directed to a page where you will see a “kit code”. It will look something like this (but with a unique alphanumeric component):

<script src=”https://kit.fontawesome.com/39aba2681b.js” crossorigin=”anonymous”></script>

If you don’t see your kit code, try clicking on the kit and then navigating to the “How to Use” tab:

Copy your kit code and paste it into the <head> of your document. Now you can start using icons!

To find the icons you need, visit this page: https://fontawesome.com/icons and use the search functionality. Icons are placed in your layout by copying the appropriate <i> tag and pasting it into your HTML. For example, the dog icon is embedded using this tag:

<i class=”fas fa-dog”></i>

note: The <i> tag is actually meant to do something else and doesn’t officially have anything to do with icons. Font Awesome has appropriated this tag for use with their system. Why do you think they did this? What are the pros and cons of using the <i> tag? What was it originally meant for? What should you do if your CSS code is directing special styles to <i> elements?

In your site, the icons should be implemented as hyperlinks so that one can click on them to be directed to the appropriate social media page.

The use of icons in our design presents special challenges for accessibility. We need to make sure that users with visual disabilities are able to perceive the purpose of the hyperlink when using a screen reader. Therefore, we need to make sure that even though users navigating visually will perceive the purpose by seeing the icon, the HTML also contains some text description of the link that can be converted to audio by a screen reader program. Figure out how to do that here: https://fontawesome.com/how-to-use/on-the-web/other- topics/accessibility#web-fonts-semantic

They provide a few different choices for making your icons accessible; my opinion is that the best option is the one that involves using the aria-label and aria-hidden attributes.

Optional task: figure out what ARIA stands for, and what the ARIA specification is meant to do.

Task 4: Google Fonts:

So far, we’ve been using boring fonts that are guaranteed to work in every browser. This has been necessary because there’s no way to know which fonts will be available on a user’s system. However, there’s another way: Google Fonts (and other similar services) which allow us to embed fonts that can be automatically downloaded onto the user’s system when they view the page.

Spend a bit of time exploring the fonts available at https://fonts.google.com/. Be sure to experiment with the search and filter options.

Figure out how to select font families and add them to your shopping cart of fonts. (They actually call it Selected Families, not shopping cart.) Figure out how to view your selected fonts and add and remove different styles.

Then, do the following:

  • Add the Jost font family with the following styles:
    • Regular 400
    • Regular 400 italic
    • Regular 600
  • Add the Crimson Text font family with the following styles:
    • Regular 400

(note that numbers such as 400, 600 etc. correspond to the font-weight.)

From the Selected Family menu, figure out how to get the line of CSS code that you will paste in your CSS stylesheet to embed these fonts in your site. Hint: the relevant CSS code will involve the @import rule. Warning: don’t copy the <style> tags if you intend to place this code in your CSS file!

Paste this @import rule at the top of your stylesheet. You can now use these fonts on the page the way you would use any font: with the font-family CSS property! Note that font family names that have spaces in them (like “Crimson Text”) will have to be surrounded by double string quotes.

Set the default font family for the whole page to “Crimson Text” with serif as the fallback. Have the font family for all headings set to Jost with sans-serif as the fallback. Have the tagline also set to Jost, but using the italic style. (figure out how to do this.)

Task 5: Basic Styles

Using CSS, implement the following:

  • Set the width of all images to 100% so that they fill their containers.
  • Change the color of “Assignment 4” in the <h1> to steelblue.
  • In the starter files, I’ve given you an image called dog_and_cat_pattern-11.jpg. Using the background-image property, apply this image to the <body>: https://www.w3schools.com/cssref/pr_background-image.asp
    • Since the image is too large for the page, we need to make it smaller using the

background-size property. Figure out how to do this.

  • Set the background color of the wrapper <div> to white. Set an appropriate padding, box shadow and maximum width (1000px). Center the element in the window. The wrapper should not get larger than 1000px, but should shrink appropriately when the browser window is made narrower than 1000px.

What does the “a” stand for in rgba()?

Task 6: Grid Layout For Navigation Menu

By default, our HTML container elements (such as footer, main, nav, section, article, etc.) will stack on top of each other vertically. (As block elements do.) However, we’re often going to need to create layouts that are a bit more complex than that. For example, we may need to create multi-column layouts, sidebars, grid layouts, etc.

To do this, we’re going to use a new display property called grid. Let’s start by using this property to align the elements of our navigation menu horizontally. While we previously did this by using display:inline-block, the CSS grid system gives us the advantage of creating a responsive system in which the nav elements resize themselves to fit the window, regardless of the window or device size.

Properties that affect the whole grid layout are always applied to the parent element in which the grid cells are contained as children. In the case of the navigation menu on this page, figure out which element is the parent, and which elements are the children that will become the grid cells.

In the CSS code, select the parent element and add the following property:

display: grid;

The parent is now a grid container. We now need to set up a column template for the grid. In the parent style declaration block, set the following CSS property:

grid-template-columns: 1fr 1fr 1fr 1fr;

The above code is setting up four columns (since our navigation menu has four items). The fr unit is used for the flexible length value. What we’re doing here is dividing the free space inside the grid parent into four equal parts. We know they’re equal because each column has the same value: 1fr. If we wanted one column to be larger than the others, we could give it a larger value, like 2fr, for example.

In order to add some space between the grid columns, use the grid-gap property:

gap: 1rem;

Optional challenge: try reducing the number of columns in the grid. What happens? What happens if you add additional columns?

A few other things you should do:

  • Remove the bullet points from the list;
  • Figure out how to remove the empty space on the left side of the grid. Where is this coming from? Hint: the inspector tool will be helpful for this.

Task 7: Other Grid Layouts

Using CSS grid, do the following:

  • Figure out how to split the <main> element into two columns with the left column being three times wider than the right column. The left column should contain the “articles” section (with “Today’s Headlines”) and the right column should contain the <aside> content (with “Article Archive” and “Our Partners”).

Make sure the <main> element has only two direct children, which will be arranged as the left and right column. If you have more than two children in the <main> element, you may need to revisit the code you wrote in Task 2.

  • Figure out how to split the <footer> into three columns of equal width.
  • Figure out how to split the “articles” section into a grid with two columns and multiple rows. This section should have, in the HTML mark up, five children: one heading and four articles. (You may need to revisit your solution for Task 2 if this is not currently the case.)

This property allows us to have an element stretch across multiple columns by specifying a start column and end column. (or a start column and the number of columns to stretch across.)

  • Note that you don’t have to do anything special to set up multiple rows; the grid cells will automatically flow into new rows once the first row is filled.

Task 8: Remaining Styles

The hard part is done; now we just need to add a few additional styles:

  • The two theme colors for this page are brown and steelblue; apply these colors to the appropriate elements.
  • Use the inline-block display property to horizontally align the social media icons. Remove the list bullets. Try to match the size and spacing from the screenshots.
  • Match the colors and approximate size of the headings to the screenshots.
  • Add borders, padding and margin to match the screenshots.
    • Remember that the gap property can be used to add space between grid cells.
  • Set the background color of the right column to be a partially transparent version of steelblue using the rgba() function. To do this, get the RGB value of steelblue from here: https://www.rapidtables.com/web/color/html-color-codes.html
  • Implement any other styles necessary to approximately match the screenshots.

Check Your Work

  • Validate your HTML and CSS code. Don’t forget to save screenshots to hand in.
    • Embedding the Google fonts in your HTML code may cause validation errors; try embedding them using CSS instead.

Hand In

Rename your working folder to a4-firstname-lastname. (with your own first and last name, of course!) Create a new folder called validation that contains your validation screenshots and add it to this folder. Make sure the work you’re submitting does not contain any unnecessary files, such as the screenshots from the starter files. Create a Zip archive from the a4-firstname- lastname folder and hand it in to D2L. (Do not use some other archive format like Rar or 7z. If you’re having trouble creating a Zip archive, please let me know.)

Grading

  • [5] HTML markup
  • [2] Accessible icons
  • [2] Google fonts applied
  • [4] Grids
  • [2] Misc. styles (colors, borders, box model, etc.) Total: 15

Note that up to -2 may be deducted for improper hand in, misnamed files, disorganized workspace, etc. Please ask me if in doubt.

Resources:

Order Now
No Fields Found.
Universal Assignment (October 2, 2023) Assignment 4: Intermediate CSS Layout. Retrieved from https://universalassignment.com/assignment-4-intermediate-css-layout/.
"Assignment 4: Intermediate CSS Layout." Universal Assignment - October 2, 2023, https://universalassignment.com/assignment-4-intermediate-css-layout/
Universal Assignment July 6, 2022 Assignment 4: Intermediate CSS Layout., viewed October 2, 2023,<https://universalassignment.com/assignment-4-intermediate-css-layout/>
Universal Assignment - Assignment 4: Intermediate CSS Layout. [Internet]. [Accessed October 2, 2023]. Available from: https://universalassignment.com/assignment-4-intermediate-css-layout/
"Assignment 4: Intermediate CSS Layout." Universal Assignment - Accessed October 2, 2023. https://universalassignment.com/assignment-4-intermediate-css-layout/
"Assignment 4: Intermediate CSS Layout." Universal Assignment [Online]. Available: https://universalassignment.com/assignment-4-intermediate-css-layout/. [Accessed: October 2, 2023]

Please note along with our service, we will provide you with the following deliverables:

Please do not hesitate to put forward any queries regarding the service provision.

We look forward to having you on board with us.

Categories

Get 90%* Discount on Assignment Help

Most Frequent Questions & Answers

Universal Assignment Services is the best place to get help in your all kind of assignment help. We have 172+ experts available, who can help you to get HD+ grades. We also provide Free Plag report, Free Revisions,Best Price in the industry guaranteed.

We provide all kinds of assignmednt help, Report writing, Essay Writing, Dissertations, Thesis writing, Research Proposal, Research Report, Home work help, Question Answers help, Case studies, mathematical and Statistical tasks, Website development, Android application, Resume/CV writing, SOP(Statement of Purpose) Writing, Blog/Article, Poster making and so on.

We are available round the clock, 24X7, 365 days. You can appach us to our Whatsapp number +1 (613)778 8542 or email to info@universalassignment.com . We provide Free revision policy, if you need and revisions to be done on the task, we will do the same for you as soon as possible.

We provide services mainly to all major institutes and Universities in Australia, Canada, China, Malaysia, India, South Africa, New Zealand, Singapore, the United Arab Emirates, the United Kingdom, and the United States.

We provide lucrative discounts from 28% to 70% as per the wordcount, Technicality, Deadline and the number of your previous assignments done with us.

After your assignment request our team will check and update you the best suitable service for you alongwith the charges for the task. After confirmation and payment team will start the work and provide the task as per the deadline.

Yes, we will provide Plagirism free task and a free turnitin report along with the task without any extra cost.

No, if the main requirement is same, you don’t have to pay any additional amount. But it there is a additional requirement, then you have to pay the balance amount in order to get the revised solution.

The Fees are as minimum as $10 per page(1 page=250 words) and in case of a big task, we provide huge discounts.

We accept all the major Credit and Debit Cards for the payment. We do accept Paypal also.

Popular Assignments

Foundations of Communication Assessment 2 Instructions

Discussion task (Total grade – 10%)   Process Work (Steps to complete the task) Answer on the Assessment 2 Submission Document – Do not upload this instruction document. Requirements (important elements to include) lastname_firstname_studentID_COMS_Assess 2_semester_year. Process for Assessment discussion tasks NOTE: If you do not participate in the class discussions then

Read More »

Assessment Two Dos and Don’ts (Internal)

Do: Read the assessment instructions carefully Read the marking rubric carefully Understand the question – break it down Conduct research – record the reference details Read the topic materials about communication theories, forms and factors and refer to them Contribute to the discussions in class or no marks for the

Read More »

Unpacking the Question: Assessment Two

Studying at university requires you to become familiar with strategies to un-pack or breakdown a variety of assessment questions/tasks throughout your studies.  Task Example of integrating the discussion, research and theories. In the group discussion my group members (name them) stated that an advertisement for a beauty product would most

Read More »

MGMT0001 Introduction to Commerce Assessment

MGMT0001 Introduction to Commerce Assessment 2 (worth 30%) Due date:                  2:00pm (AWST) Friday 15th September 2023 Submission:              Via Turnitin assessment submission link (see ‘Assessment 2’ folder in ‘Assessments’ section of Blackboard). Additional Instructions: Part A (42 marks) Nathan is a well-known chef with years of experience cooking various cuisines. After

Read More »

ACCT5011: Accounting Systems in the Digital Age

Practical Assignment Guide, Semester 2, 2023 Due Date for Submission: Monday 11th September 2023 at 5.00 PM Please note that the Folio Assignment for ACCT5011 Accounting Systems in the Digital Age is an individual assessment task worth 30% of your total marks in the unit. Please refer to the online

Read More »

EC229- Review session

Assume two cities, A and B, that can’t trade between them. Each city produces its own coconuts for its local market. If suddenly trade is possible then: D) As we saw in class, the new price will be somewhere between the original price 𝑃_𝐴,𝑃_𝐵. Hence it is impossible for consumers

Read More »

Computing Theory COSC

Computing Theory COSC 1107/1105 Assignment 1: Fundamentals Assessment Type Individual assignment. Submit online via Canvas → As- signments → Assignment 1. Marks awarded for meeting re- quirements as closely as possible. Clarifications/updates may be made via announcements/relevant discussion forums. Due Date Week 6, Sunday 27th August 2023, 11:59pm Marks 125

Read More »

BE279 Applied Statistics and Forecasting

Strategy, Operations, & Entrepreneurship Group Essex Business School Module Code BE279 Module Title Applied Statistics and Forecasting Assessment Type Individual Report (2,000 word) Academic Year 2022/23, Spring Term Submission Deadline Refer to FASER Task Specific Guidance Please note that: Module Learning Outcomes On successful completion of the module, students will

Read More »

Learning Design Tool: Little Learners Level 1 sounds

Learning Design Tool: Little Learners Level 1 sounds. Prepared by Sara Hart Date 30th August, 2023 (feel free to leave this date as it is the AT2 due date) Brief description of Learning Design   Chooseit Maker: Create, edit and play personalised learning activities that can be used in your

Read More »

HUMN1041 PEOPLE, PLACE AND SOCIAL DIFFERENCE ASSIGNMENT

HUMN1041 PEOPLE, PLACE AND SOCIAL DIFFERENCE ASSIGNMENT 1 TEMPLATE This assignment is made up of three (3) parts, plus a reference list and appendix. Marks are allocated for each section, as follows: – 1 mark Please ensure that you provide your answers in this template, and provide a Reference list

Read More »

Model 3 Launch in Australia

Client Information Company Name Tesla Contact Name   Email   Phone Number   Address Level 14, 15 Blue St. North Sydney, NSW 2060 Australia Ad link & image Project Information Project Title Model 3 Launch in Australia Project Description (100 words) Highlight the uniqueness of the car. Show the superior

Read More »

MKT10009 Marketing and the Consumer Experience

School of Business, Law and Entrepreneurship Assessment Task – Assignment 2  MKT10009 Marketing and the Consumer Experience Semester 2, 2023. Assessment Type Analytical Report Associated Unit Learning Outcomes (ULO’s) 2, 3, 4 Group or Individual task Individual Value (%) 25% Due Date Monday 20th September at 10:00 AET – Enterthis

Read More »

ASSIGNMENT – 1st Evaluation

ASSIGNMENT – 1st Evaluation Date of Submission- 4TH SEP 2023 25 MARKS COMPARATIVE PUBLIC LAW Q. You are the new Central Minister for Urban Development who is keen to make major Indian cities as smart cities. You visit different countries like USA, UK, European Countries, Japan and other developed countries

Read More »

Corporate & Financial Due Diligence Report

[Name of the company] Note: Students should keep in mind that application of legal provisions (including Securities Regulations) and analysis of the same is important. Merely putting the facts and figures won’t fetch even a decent mark. Note: Students should only mention the broad area of business. This part should

Read More »

ECON1000 S2 2023 – Marking Guidance and FAQs on GTP

Students will be marked on the extent to which they specifically answer the question and provide clear, logical, well-reasoned and sufficient explanations. Here is a summary breakdown of how marks are allocated in this GTP: Part 1 [15 marks] §  Providing relevant observations from the information provided in the articles

Read More »

ECON1000 S2 2023 – GTP Brief

ECON1000 S2 2023 – GTP Brief A.  Context and Overview The Game Theory Presentation (GTP) is worth 30% of the final mark. GTP is a ‘take-home’ exercise with a set of tasks to do. The GTP is based on Lecture Topics: L1 and L2. You will have twenty (21) days

Read More »

Order #35042 Human Rights Research Essay

Draft due 26th Aug 2,500 words (excluding references and bibliography) Instructions: Structure: Title – The Tigray War: A Critical Analysis of What the Future Holds for Human Rights in the Region What can be done to ensure human rights violations will cease and be prosecuted? Expand on different actors and

Read More »

PMC1000: Applied Pathology

Assessment Task Sheet: Poster Presentation Date: Thursday 31st August 2023 | Weighting: 30% Assessment Task 2 You are required to develop a handout style resource (pamphlet or brochure) on a selected pathological condition which is aimed at first year student paramedics. You will need to use high quality peer reviewed

Read More »

Detailed Information: Reflective Assignment

Indigenous Peoples, Law and Justice Detailed Information: Reflective Assignment Due Date:                   Tuesday 5th September 2023 at 4:00 pm (AWST). Marks:                       30% of the total marks for this unit. Assignment:              The assignment will comprise two questions. Students must answer all parts of both questions. Examinable topics: The cultural immersion exercise and/or

Read More »

Indigenous Peoples, Law and Justice

Indigenous Peoples, Law and Justice Reflective Assignment Questions Instructions: The assignment comprises two questions. Students must answer all parts of both questions. Question 1: The proposed Referendum Question is asking Australians whether the Voice should be established. What is meant by the Voice? In May 2019, Professor Anne Twomey, an

Read More »

Cultural immersion activity

Context of Carrolup To support fellow Australian and truth telling. Third space = a spiritual an mental place, meeting point of many cultures all over the world to communicate and feel safe to merge thought and aspects of everyone’s individual culture to create a sense of what they want the

Read More »

High-Fidelity Mockup Design for a Employer / Company  Review Platform

Demo Task: High-Fidelity Mockup Design for a Employer / Company  Review Platform Project Overview: You are tasked with designing high-fidelity mockups for a  Employer / Company  review platform that serves both employers and employees/users. The platform’s goal is to provide a space where employees can share their experiences and opinions

Read More »

IMPLEMENT AND MONITOR ENVIRONMENTALLY SUSTAINABLE WORK PRACTICES

ASSESSMENT COVER SHEET (Please ensure this cover sheet is completed and attached on top of each assessment) QUALIFICATION CODE AND TITLE:  Certificate IV in Commercial Cookery UNIT CODE: BSBSUS401               TITLE: IMPLEMENT AND MONITOR ENVIRONMENTALLY SUSTAINABLE WORK PRACTICES               Student Number   Student Name   Assessor Name   Assessment Name and

Read More »

Data Analysis and Findings

Qualitative data analysis technique called thematic analysis includes reading the data collection and looking for patterns in the meaning of the data to determine the theme. Making sense of the data is an active reflexive process in which the researcher’s personal experience is important. On Instagram, though, any company can

Read More »

PHE5STL: Systems Thinking and Leadership

Assessment 2: Complex problem briefing paper instructions and submission link PHE5STL: Systems Thinking and Leadership Assessment 2: Complex, or messy, problem briefing paper Assignment type Briefing paper/policy advising paper Weighting 20% Word count / length 1,500 words Note: The word count does not included references however does include in-text citations

Read More »

Assessment 1 Week-6: UML Modelling for a shopping mall

Assessment 1(    ) Information and Rubric Subject Code  ICT505 Subject Name  Software Development Assessment Number and Title  Assessment 1 Week-6: UML Modelling for a shopping mall Assessment Type Lab Activity Length / Duration  45 Minutes Weighting %  10% Total Marks  100 Submission Online Submission Due Date Week-6 (Sunday 23:59) Mode

Read More »

The Geopolitical, Economic and Legal Environment  

Faculty of Business and Law Assignment Brief Mode E and R Regulations Module Title: The Geopolitical, Economic and Legal Environment     Assignment Number 2 Module Code: 7010SSL   Assignment Title Macro Analysis Report Module Leader: Dr. Bentil Oduro   Assignment Credits 10           Release Date:

Read More »

Paragraph Template: TEEL Structure

 With this example from the discussion board, you can see Courtney answered the question with all four elements very clearly. This gives a coherent answer using different kinds of information and academic integrity. Bias is a natural behaviour of tendency to be in favour or against something in particular. From

Read More »

Choosing the Perfect Event Theme

Choosing the Perfect Event Theme Theme selection is crucial to creating a memorable and meaningful graduation celebration for the class. This selection should reflect their accomplishments and identities. Graduation marks the end of a long period of hard work, commitment, and personal growth.  Therefore, choosing a theme that effectively captures

Read More »

Can't Find Your Assignment?

Open chat
1
Free Assistance
Universal Assignment
Hello 👋
How can we help you?