INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.

Slides:



Advertisements
Similar presentations
Chapter 3 – Web Design Tables & Page Layout
Advertisements

Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
CSS. Intro to CSS Cascading Style Sheets – styles and enhances appearance of webpage.css extension.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Chapter 7 Page Layout Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Cascading Style Sheets. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Unit 20 - Client Side Customisation of Web Pages
Tutorial 6 Creating Fixed-Width Layouts
TUTORIAL 4: CREATING PAGE LAYOUT WITH CSS Session 4.3.
CSS (Cascading Style Sheets): How the web is styled Create Rules that specify how the content of an HTML Element should appear. CSS controls how your web.
TUTORIAL 8: Enhancing a Web Site with Advanced CSS
Bayu Priyambadha, S.Kom. for long documents, you can even have links to other locations in that same document  … where ident is a variable for identifying.
Slide 1 of 83 Table Borders To specify table borders in CSS, use the border property. The example below specifies a black border for table, th, and td.
Web Development & Design Foundations with XHTML Chapter 6 Key Concepts.
Page Layout & Mobile Web Using columns, grid systems, etc… to layout sites for desktops and mobile.
CSS Dvijesh Bhatt.
LING 408/508: Programming for Linguists
Principles of Web Design 6 th Edition Chapter 10 – Data Tables.
1Computer Sciences Department. And use
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Basics of Web Design 1 Copyright © 2016 Pearson Education, Inc., Hoboken NJ.
Doman’s Sections Information in this presentation includes text and images from
Today’s objectives  Assignment 1  Padding, Margins, Borders  Fluid Layout page  Building accessible Table  Element size with padding and border 
MySQL and PHP Review CSS. Cascading Style Sheet (CSS) Style sheets are files or forms that describe the layout and appearance of a document. Cascading.
 Remember that HTML is just text  Need to point to pictures  Use the img tag  alt: › screen reader › REQUIRED for this class and to validate.
Lesson 03 // Cascading Style Sheets. CSS Stands for Cascading Style Sheets. We’ll be using a combination of Html and CSS to create websites. CSS is a.
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
Week 8 – Part 2 Page Layout Basics Key Concepts 1.
Course created by Sarah Phillips BBCD Melbourne BAPDCOM Version 1 – April 2013.
LING 408/508: Programming for Linguists Lecture 10 September 30 th.
Web Development & Design Foundations with HTML5 7th Edition
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Internet Technology Dr Jing LU Updated Dr Violet Snell / Dr Kalin Penev 1 Internet Technology (week 6)  Recap: Validating HTML  Page Layout.
CSS Fun damentals The Document Hierarchy Element Relationships The Box Model.
INTRODUCTORY Tutorial 5 Using CSS for Layout and Printing.
3.2 Cascading Style Sheets. 2 Positioning Elements Normally, elements are laid out on the page in the order that they are defined in the XHTML document.
Copyright © Osmosys O S M O S Y SO S M O S Y S D e p l o y i n g E x p e r i e n c e & E x p e r t i s e™ CSS Training.
Web Development & Design Foundations with XHTML Chapter 6 Key Concepts.
CONTROLLING Page layout
Tutorial #5 Working with the Box Model. Tutorial #4 Review - CSS Create a homework page Final Project Discussion Exam on Blackboard Styling Lists (List-style-type,
PERSPECTIVES: TUTORIAL 4 CREATING PAGE LAYOUTS WITH CSS.
INT222 – Internet Fundamentals Week 8: Using New HTML features 1.
Chapter 7.  Change body and link styles  Create a drop-down menu  Change color and font styles in the menu  Create a pop-up effect using CSS  Utilize.
CS 120: Introduction to Web Programming Lecture 10: Extra Features and Website Design Part 1 Tarik Booker CS 120 California State University, Los Angeles.
Welcome To Website Design, Hosting And Management Prepared By Webdev Solution ip ,223,96.
HTML & CSS Contents: the different ways we can use to apply CSS to The HTML documents CSS Colors and Background CSS Fonts CSS Text CSS box model: padding,
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 4 Formatting Text and Links.
NAVIGATION USING HTML TO SET UP THE BASIC STRUCTURE OF A NAV BAR.
CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve a problem External.
1 Cascading Style Sheets
Laying out Elements with CSS
CSS Layouts: Grouping Elements
Creating Page Layouts with CSS
Cascading Style Sheets
Cascading Style Sheets (Layout)
Web Development & Design Foundations with HTML5 7th Edition
Chapter 7 Page Layout Basics Key Concepts
Web Development & Design Foundations with HTML5 8th Edition
Web Development & Design Foundations with HTML5
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Basics of Web Design Chapter 7 Page Layout Basics Key Concepts
6 Layout.
Styles and the Box Model
Web Development & Design Foundations with H T M L 5
Web Development & Design Foundations with HTML5
Web Development & Design Foundations with HTML5
Laying out Elements with CSS
Presentation transcript:

INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE

2 Outline Layout & Navigation – Centering – Positioning – CSS lists – CSS tables – CSS hyperlinks – Menu – Layout Usability HTML5 new tags

Centering -lines of text Centering lines of text in a paragraph or in a heading. p { text-align: center } h2 { text-align: center } center_text.html

Centering – a block Rephrase: left and right margin to be equal. – set the margins to 'auto'. – used with a block of fixed width. div.center { border: 2px solid red; margin-left: auto; margin-right: auto; width: 400px; } … center_block.html

Centering – Vertically Specify the outer block as a table cell, – the contents of a table cell can be centered vertically. div {height: 100px; width: 500px; } div.center { border: 10px dotted red; display: table-cell; vertical-align: middle; text-align: center;} This div is centered border_vertical

Positioning property: position a browser renders html statements in the order that they are in the html file - this is called normal flow CSS positioning can be used to position elements precisely 6

Positioning Values for property: position – absolute - position precisely within the containing element – relative - position precisely relative to normal flow – fixed - position precisely within the browser window, and does not move when the page is scrolled – static - position using normal flow (default) Values for Properties: "left", "right", "top", and "bottom" can be given offsets in px or % tags, with various classes, are used to create the different divisions of the document. 7 position.htmlPosition_relative.html

Positioning what if the text takes more than the allotted space? 8 use the property "overflow" to specify an action: eg. {overflow:scroll} - include scroll bars eg. {overflow:auto} - scroll if required eg. {overflow:hidden} - hide overflow eg. {overflow:visible} - default position.html

Positioning graphics and titles can be positioned in a similar fashion: 9 Position_graphic.html

CSS Lists Set different list item markers for ordered lists Set different list item markers for unordered lists Set an image as the list item marker ul.circle {list-style-type:circle} ul.square {list-style-type:square} ol.upper-roman {list-style-type:upper-roman} ol.lower-alpha {list-style-type:lower-alpha} 10

Property: list-style-type Values 11

12 Property: list-style-type Values Css_list.html

Table Formatting CSS properties: – margin, padding, width, height, text-align, vertical- align, background-color, background-image, border formatting the entire table: – table {margin: auto; width: 80%} – table {border: dotted} – table {background-color: yellow} 13

Border Collapse Property: border-collapse sets whether the table borders are collapsed into a single border or separated. E.g.: table { border-collapse:collapse; } table,th, td { border: 1px solid black; } 14

Formatting Table Cells td {border: 4px inset #4400FF} td {padding:10px 20px} td {background-color: aqua} td {height: 100px; width: 400px} using "text-align" and "vertical-align" 15 Css_table.html

Table Sections - group the first one or more rows of a table for formatting - group the middle rows of a table for formatting - group the last one or more rows of a table for formatting 16 Table_section.html

Styling Links Properties: – color, font-family, background Links are styled differently depending on what state they are in. The four link states are: – a:link - a normal, unvisited link – a:visited - a link the user has visited – a:hover - a link when the user mouses over it – a:active - a link the moment it is clicked 17 NOTE: When setting the style for several link states, a:hover MUST come after a:link and a:visited a:active MUST come after a:hover Css_link.html

CSS – display property defines how a certain HTML element should be displayed. p.inline { display:inline; } 18 Css_display.html

display property values 19

Menu Link_download.html Menu1.html Menu2.html Menu3.html 20

HTML5 Structural Elements  HTML 5 defines a number of new container elements for constructing documents. – Header, nav, section, aside, article and footer 21

HTML5 new tags - Defines an article. Specifies independent, self-contained content. An article should make sense on its own and it should be possible to distribute independently from the rest of the site. Potential sources for the element: – Forum post – Blog post – News story – Comment 22 New_tags.html

HTML5 new tags - Defines content aside from the page content The aside content should be related to the surrounding content. The content could be placed as a sidebar in an article. 23 New_tags.html

HTML5 new tags - Defines a header for a document or section The tag specifies a header for a document or section. The element should be used as a container for introductory content or set of navigational links. You can have several elements in one document. Note: A tag cannot be placed within a, or another 24 New_tags.html

HTML5 new tags - Groups heading ( to ) elements The element is used to group a set of to elements, when a heading has multiple levels (subheadings). 25 New_tags.html

HTML5 new tags - Defines a section in a document Such as chapters, headers, footers, or any other sections of the document. 26 New_tags.html

HTML5 new tags - Defines a footer for a document or section A element should contain information about its containing element. A footer typically contains the author of the document, copyright information, links to terms of use, contact information, etc. You can have several elements in one document. 27 New_tags.html

Web Pages Layouts  One-column layout 28  Two-column layout  docStructure.html & docStructure.css

Web Pages Layouts  Three-column layout  Column3.html & column3.css 29

Create Create 2-column fluid (float-based) layouts 1.Set the width of the page (e.g. 960px or 80%) and center the page:.container { width: 960px; background-color: grey; margin: auto; } 2.Set the width of the “aside” block and float it to left: aside { width: 10%; float: left; } 3.Set the width of the “main” section and float it to left: section.main { width: 80%; float: left; } 30

Create Create 2-column fluid (float-based) layouts 4. Set the clear property of the footer to ‘both’: footer { clear: both; background-color: #aaa; } 5. Set margin, border, padding, background-color, … to each structural element, e.g.: aside, section.main {margin-top: 58px; margin-right: 10px; margin- left: 10px; } Note: You may use relative width or absolute values for the page and columns. 31

Create Create 2-column tabular layouts docStructure.html & Tabular.css 32

Create Create 2-column tabular layouts.container display: table;.container { display: table; width: 960px; margin: auto; } aside display: table-cell; aside { display: table-cell; width: 192px; } section.main display: table-cell; section.main { display: table-cell; width: 720px; } footer { background-color: #aaa; } aside, section.main {margin-top: 58px; margin-right: 10px; margin-left: 10px; Note: using HTML table to create page layouts is obsolete and not allowed in INT222 assignments 33

CSS Resources Menu Menu Layout CSS Library: CSS Reference: US/docs/Web/CSS/Reference US/docs/Web/CSS/Reference 34

Usability What and Why of Usability User Experience Basics experience.html User Interface Design Basics design.html Web Style Guide 35

Lab 4 Practice with CSS 36

Next Class Week 8 (after study week) Midterm test 1- – Paper based test – Reference sheet provided – You are not allowed any references – Class time, 2 periods (100 minutes) 37

Thank you!