GRC 338: Assignments

Final website: responsive

Using the layout from the last assignment, use media query as necessary to make it adapt to different sizes. On desktop, you want to make the website look as close as possible to the screenshots below:

Screenshot of a generic website on a desktop-width window.

Screenshot of a generic website on a desktop-width window.

Screenshot of a generic website on a desktop-width window.

Screenshot of a generic website on a desktop-width window.

Screenshot of a generic website on a desktop-width window.

Screenshot of a generic website on a desktop-width window.

Screenshot of a generic website on a desktop-width window.

Screenshot of a generic website on a desktop-width window.

Screenshot of a generic website on a desktop-width window.

Screenshot of a generic website on a desktop-width window.

You will need the following line on the bottom of your CSS, then:

@media screen and (min-width: 60em) {

    }

Tasks

  1. Start by reading my feedback from previous assignments, so you don’t make the same mistakes.

  2. If you haven’t yet, you’ll need to include the following rule in your CSS:
    body {
    font-family: sans-serif;
    }

  3. You also need the following rule in your CSS:
    div.container {
    position: relative;
    min-height: 100vh;
    }

  4. To make each link to change color when it’s the selected page, give a class selected to its li in HTML, and use nav ul li.selected a { } as the selector of a new rule in CSS. (This rule doesn’t need to be in the media query.)

  5. Use an <article> element in your about.html and contact.html, then style it with light blue in CSS.

  6. Include on the media query only what’s absolute necessary. (I only used three rules and a total of seven declarations in the media query.)

  7. When you’re done, use tools such as FreeFormatter, HTML Formatter, or Code Beautify to organize your HTML code.


Evaluation

Penalties in the list of easy mistakes to avoid are 20 points now. Three or more mistakes is an automatic zero, with no further comments. There’s no reason not to avoid all of them, though.


Tips

  1. Don’t rewrite all the properties for an element on its declaration in the media query. Write only what changes in bigger sizes.

  2. Make sure to use appropriate, semantic class names.

  3. Use proper headings for headings, proper paragraph tags for each paragraph, appropriate list and list items tags for the lists, etc.

  4. Make sure to use appropriate, semantic property values in your CSS.

  5. Don’t forget to test in different screen sizes.

  6. Make sure to include the <meta name="viewport" content="width=device-width, initial-scale=1.0"> tag in your HTMLto have your page rendering correctly on mobile phones.

  7. Make sure to avoid the simple mistakes. Each mistake from the list of simple mistakes to avoid will be a 20‑point penalty. Three or more mistakes is an automatic zero, with no further comments. It’s easy to avoid them all, though.

  8. Don’t change the hierarchy of your HTML based on how the pages render on the browser. “I don’t like the bullets” is not a good reason not to use lists or list items; you can style the bullets out in CSS. “I want the navigation to be bigger” is not a good reason to make them headings; again, just style it in CSS.


Submission

  1. Go to your public repository on GitHub, and open a new folder named grc338/website-responsive. (It’s a different URL from last week.)

  2. Create a new index.html file and commit. 

  3. Upload all four HTML files (index.html, about.html, menu.html and contact.html) to your GitHub repository. 

  4. Upload your CSS file.

  5. Upload all your image files too.

  6. Click on your name to check if it’s working.

Check Canvas for deadlines.