Create a three column layout using CSS, divs and floating

Similar documents
CSS worksheet. JMC 105 Drake University

Styles, Style Sheets, the Box Model and Liquid Layout

Cascading Style Sheets for layout II CS7026

CSS Exercises. Create a basic CSS layout Use BlueFish to open layout.html Create a layout using <div> tags Use a browser (Firefox) to view your page

AGENDA :: MULTIMEDIA TOOLS :: CLASS NOTES

E-Business Systems 1 INTE2047 Lab Exercises. Lab 5 Valid HTML, Home Page & Editor Tables

Taking Fireworks Template and Applying it to Dreamweaver

Using Dreamweaver CC. Logo. 4 Creating a Template. Page Heading. Page content in this area. About Us Gallery Ordering Contact Us Links

What is the Box Model?

AGENDA :: MULTIMEDIA TOOLS :: (1382) :: CLASS NOTES

Building Page Layouts

COMP519 Web Programming Lecture 8: Cascading Style Sheets: Part 4 Handouts

Introduction to WEB PROGRAMMING

Designing the Home Page and Creating Additional Pages

Using CSS for page layout

AGENDA. EMBEDDING FONTS [ Font Files & CSS font-family ] :: Online Font Converter :: ADD font-family css code to style.css

CSS for Page Layout Robert K. Moniot 1

Guidelines for doing the short exercises

How to lay out a web page with CSS

ORB Education Quality Teaching Resources

Before you begin, make sure you have the images for these exercises saved in the location where you intend to create the Nuklear Family Website.

Introduction to Computer Science Web Development

Positioning in CSS: There are 5 different ways we can set our position:

CSS Design and Layout Basic Exercise instructions. Today's exercises. Part 1: Arrange Page into Sections. Part 1, details (screenshot below)

THE HITCHHIKERS GUIDE TO HTML

COMSC-031 Web Site Development- Part 2

Lab Chapter 5: Applying The Box Model Habitat for Humanity

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) More on Relative Linking. Learning Objectives (2 of 2)

How to lay out a web page with CSS

Using Dreamweaver CS6

HTML and CSS a further introduction

Wanted! Introduction. Step 1: Styling your poster. Activity Checklist. In this project, you ll learn how to make your own poster.

WEBSITE PROJECT 2 PURPOSE: INSTRUCTIONS: REQUIREMENTS:

CompuScholar, Inc. Alignment to Utah's Web Development I Standards

Chapter 7 BMIS335 Web Design & Development

Using Dreamweaver CS6

Layout with Layers and CSS

The Importance of the CSS Box Model

ICT IGCSE Practical Revision Presentation Web Authoring

When you complete this chapter, you will be able to:

Getting Started with CSS Sculptor 3

Lab 1: Introducing HTML5 and CSS3

Fundamentals of Web Technologies. Agenda: CSS Layout (Box Model) CSS Layout: Box Model. All HTML elements can be considered as a box or a container

FLOATING AND POSITIONING

Cascading Style Sheets Level 2

USER GUIDE. MADCAP FLARE 2017 r3. QR Codes

Table Basics. The structure of an table

Responsive web design (RWD) CSS3 Media queries. Mobile vs desktop web sites. Web Development 1 CS1115/CS5002

ICT IGCSE Practical Revision Presentation Web Authoring

COMS 359: Interactive Media

ITSE 1401 Web Design Tools Lab Project 4 (Expression Web 4 - Units M, N, O, P) Last revised: 1/9/14

CSCU9B2: Web Tech Lecture 3

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

Exploring Computer Science Web Final - Website

Creating a Job Aid using HTML and CSS

Dreamweaver CS6. Table of Contents. Setting up a site in Dreamweaver! 2. Templates! 3. Using a Template! 3. Save the template! 4. Views!

Lab 2: Movie Review. overview.png background.png rottenbig.png rbg.png fresh.gif rotten.gif critic.gif

Architectural Engineering Senior Thesis CPEP Webpage Guidelines and Instructions

Introduction to HTML & CSS. Instructor: Beck Johnson Week 5

Page Layout Using Tables

Getting Started with Eric Meyer's CSS Sculptor 1.0

Micronet International College

CIS 1350 Final Project Part 1 of 4

CS7026 Media Queries II. Different Screen Size Different Design

HTML5: Adding Style. Styling Differences. HTML5: Adding Style Nancy Gill

VISA/APCO/STAC 2P61 WEBSITE CREATION Fall Term 2012

What do we mean by layouts?

CSS Box Model. Cascading Style Sheets

Page Layout. 4.1 Styling Page Sections 4.2 Introduction to Layout 4.3 Floating Elements 4.4 Sizing and Positioning

How to lay out a web page with CSS

Block & Inline Elements

Downloads: Google Chrome Browser (Free) - Adobe Brackets (Free) -

Web Programming and Design. MPT Senior Cycle Tutor: Tamara Week 2

Magazine-style websites often have lots of small items on a page. First you re going to create a heading and background for your magazine.

PIC 40A. Lecture 4b: New elements in HTML5. Copyright 2011 Jukka Virtanen UCLA 1 04/09/14

(Simple) JavaScript Framework Homework

Creating Layouts Using CSS. Lesson 9

CSS means Cascading Style Sheets. It is used to style HTML documents.

Microsoft Expression Web Quickstart Guide

NAVIGATION INSTRUCTIONS

Joomla! Advanced Content Editing January 11, 2018

Product Page PDF Magento Extension

Chapter 1 Introduction to Dreamweaver CS3 1. About Dreamweaver CS3 Interface...4. Creating New Webpages...10

Dreamweaver: Web Forms

GIMP WEB 2.0 MENUS. Web 2.0 Menus: Horizontal Navigation Bar. Hover Effect:

HTML5. HTML5 Introduction. Form Input Types. Semantic Elements. Form Attributes. Form Elements. Month Number Range Search Tel Url Time Week

Web Design and Development ACS Chapter 12. Using Tables 11/23/2017 1

[PACKT] HTML5, CSS3, and jquery. Dreamweaver CS5.5 Mobile. and Web Development with

Working with Images and Multimedia

Links Menu (Blogroll) Contents: Links Widget

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student

Introduction to CSS. 2 Sep 13. Derek Peacock. An introduction to defining CSS style rules using tags, classes and ids.

IDM 221. Web Design I. IDM 221: Web Authoring I 1

HIERARCHICAL ORGANIZATION

Using Dreamweaver. 4 Creating a Template. Logo. Page Heading. Home About Us Gallery Ordering Contact Us Links. Page content in this area

HTML and CSS COURSE SYLLABUS

Tutorial 4. Activities. Code o Editor: Expression Web o Focus : Base Layout, navigation with folders, external stylesheets, Open up Expression Web

ITNP43: HTML Lecture 5

Web Design and Implementation

HTML/CSS Lesson Plans

Transcription:

GRC 275 A6 Create a three column layout using CSS, divs and floating Tasks: 1. Create a 3 column style layout 2. Must be encoded using HTML5 and use the HTML5 semantic tags 3. Must se an internal CSS 4. Use a container div, width and is centered to create your layout 5. Add minimum 3 column style layout inside the article area 6. Must have examples of padding inside the three columns 7. Add sample content to the three columns and the footer and header. 8. The content for the website must be different than the last assignment 9. Add padding in each column div style in order put spacing inside each column 10. Provide an example of floating images inside each of the main div columns so the text wraps nicely around the image 11. Add a header and footer tag style

Design Specifications: In this assignment we will be creating a multi-column layout using a technique known as floating. This assignment is very similar to our last assignment where we created a multicolumn layout using the new column property in CSS 3.0. Before this particular technique we created multi-column layouts using divs styled with widths and floating. This assignment will explain how to work with floating to create a similar type of layout, think of it as the old school muti-column technique. Each of the main content areas like the header, footer, and the three columns need to have sample content. Add sample content to webpage and there is no required theme on this assignment. Do not use the same content as the last assignment please. You can use the sample text by using a website like http://www.lipsum.com/ which generates dummy text or use your own sample text. Optional, create a theme but must be different than previous assignments and different from A5. Create an index.html and make sure to save inside a new a6 folder. Required: use an internal CSS stylesheet unless you decide to optionally create multiple pages.

Requirements: Step 1 Required: create a div container layout, use semantic tags and the div column layout as shown below <div class="container"> </div> <header> </header > <nav> </nav> <article> </article> <footer> </footer> <div class="leftcolumn"> Left column content </div> <div class="centercolumn"> center column content </div> <div class="rightcolumn"> Right column content </div>

Step 2 Create a container class in order to create the basic layout. The left and right margins set to auto will center the layout in the page. Notice how the container is set to 1000 pixels wide. The value will determine how wide each of our three columns can be in a later step. For this assignment you are required to create one web page and it is easiest and required to use an internal CSS file that defines the CSS within the head of the webpage..container { width: 1000px; margin-right: auto; margin-left: auto; Required: make sure to also add a background color or background image to the container style shown above. Make sure there is high contrast between the text color and the background so that the text is highly readable. Optional: add a border and rounded corners effect by adding these properties with similar values to your container style. border: 2px solid; border-radius: 25px; Step 3 Create the tag style for the new semantic tags to act like block elements in older browsers header, footer, nav, article { display: block;

Step 4 Create a tag style in order to style the body. Define the normal and essential properties that we are used to defining. Required: add a line height property and value to the body so that text has more height between lines making text much easier to read. Required: add a background graphic that repeats nicely and is not too bright. Don t use a very bright jpg image (like a photograph) and do not just use a solid color for your background. The next step begins on the next page.

Step 5 Create the.leftcolumn class in order to style the div that represents the leftcolumn. The style defines a width and it will float left. Remember our container is 1000 pixels wide. 1000 300 = 700 pixel width available for our remaining two columns..leftcolumn { width: 300px; Create the.rightcolumn class in order to style the div that represents the rightcolumn. The style defines a width and it will also float left. 700 300 = 400 pixel width available for our remaining center column..rightcolumn { width: 300px; Create the.centercolumn class in order to style the div that represents the centercolumn. The style defines a width and it will also float left. 400 400 = 0 pixel width available for our threecolumn layout, meaning we have used up the exact amount of pixel width available from the original container..centercolumn { width: 400px; Important note: if we add any border, padding or margins to any of the three columns they would no longer be able to fit within the 1000 pixel width of our container. We will explain how to add some padding in a later step

Step 6 Add sample content to each of our three columns. There is no required theme on this assignment. You can use the sample text by using a website like http://www.lipsum.com/ which generates dummy text or use your own sample text or come up with a new theme. Required: Add a floated image to each of the three main columns. Preview page in browser, you should have three columns each displayed next to each other. Unlike the last assignment where we had one column that wrapped and displayed content into three columns this layout has three unique div s that have their own content with the option of having their own unique properties and styling. Step 7 One of the pitfalls of floating is that any additional content that we don t want to potentially be floated, in this case the footer, may unintentionally appear and display around the floated area. Anything after a float that you don t want floated should have a class which contains a property clear:both. In our example, this says not to display the footer until after anything is finished floating and display under the floats. It keeps the footer underneath the floated div s. If we were not using the full 1000 pixel width of the container the footer would try and display next to the right column which is being floated. This style keeps the footer properly underneath the three floated columns or divs. footer { clear: both;

Step 8 Required: add a padding property to each of the three column styles. The following property and values will add 10 pixels to all of the sides of a column style. Padding adds spacing inside of the column or div. Margin would add spacing outside of the div. Adding a border would put a border around the div. Margin is the space outside of the border and padding is the space inside of the border..leftcolumn { width: 300px; padding: 10px;.rightColumn { width: 300px; padding: 10px;.centerColumn { width: 400px; padding: 10px; Optional, justify the text. Preview page in browser, you should now only have two columns displayed next to each other. The third div should now be displayed below the other two div s. The reason it is no longer displaying properly is because the container width is no longer wide enough to accommodate the new width (we just added padding) of all three columns. The problem is adding padding increases the total width of a column. Important note: if we add any border, padding or margins to any of the three columns they would no longer fit within the 1000 pixel width of our container. Container = 1000 pixels wide. Left column 300 pixels wide + 20 pixels (padding on the left and right side of the left column) = 320 pixels actual width. Right column 300 pixels

wide + 20 = 320 pixels wide. Center column 400 pixels wide + 20 = 420 pixels wide. Total width of all three columns 320 + 320 + 420 = 1060 pixels wide. Modify the container style to accommodate the new width..container { width: 1060px; margin-right: auto; margin-left: auto; Preview page in browser, you should now again have the three columns properly displayed next to each other. If you added additional margins or borders to the columns you would have to adjust the container to accommodate the new total width. Step 9 Create a float image class in order to float and add box styling to the images in each of the three columns. Once floated, any content after the image wraps around the floated image. Float value can be set to left or right..floatleftimageborder { border: 3px solid #999; Required: add margins (in the style shown above) around the floated image in order to put spacing around image and border in order to make text more readable. Remember you are required to add images in each of the three columns and apply floating examples to each of these images. See example on the next page.

.floatleftimageborder { border: 3px solid #999; margin-right: 10px; margin-bottom: 5px; margin-top: 5px; Step 10 Create a footer tag style footer { Required: Add at least two properties with values to the above style Create a header tag style header{ Required: Add at least two properties with values to the above style Step 11 Make sure you have added sample content to webpage. Content must be different from the last assignment. For example, add sample content inside each of the main content areas: header, footer and the three columns. Make sure you have saved page as index.html and save inside an a6 folder. Reminder, it is required to name files and folders using all lowercase and with no spacing in the naming.

Since you are only required to create one web page for a6 it is easiest and required to use an internal CSS file that defines the CSS within the head of the webpage. Step 12 Upload assignment to your website, add link on your course management page and then email Instructor your assignment s URL. Extra credit: (not required) Add a theme to this assignment. Must be different than all other past assignments. Create multiple pages and add a standardized nav bar to the layout and move all CSS into an ext CSS file Experiment with adding new CSS techniques