CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.

Slides:



Advertisements
Similar presentations
1 Cascading Style Sheets Continued Different kinds of selectors in a style sheet –Simple- Pseudo-Class –Contextual- Pseudo-Element –Class Image Styles.
Advertisements

Cascading Style Sheets
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Today CSS HTML A project.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Slide 1 CMPS 211 Internet Programming Spring 2008 Dynamic Effects with Styles Chapter 12 2/6/08.
Chapter 7 Page Layout Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Very quick intro HTML and CSS. Sample html A Web Title.
Part 5 Introduction to CSS. CSS Display - Block and Inline Elements A block element is an element that takes up the full width available, and has a line.
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.
Links.  Styling Links  Links can be styled with any CSS property (e.g. color, font-family, background-color).  Special for links are that they can.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
Principles of Web Design 5 th Edition Chapter Nine Site Navigation.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
Building a Website: Cascading Style Sheets (CSS) Fall 2013.
With CSS, a color is most often specified by: a HEX value - like "#ff0000" an RGB value - like "rgb(255,0,0)" a color name - like "red“ Example h1.
1 Pengantar Teknologi Internet W03: CSS Cascading Style Sheets.
Recognizing the Benefits of Using CSS 1. The Evolution of CSS CSS was developed to standardize display information CSS was slow to be supported by browsers.
กระบวนวิชา 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.
Class four: the box model and positioning. is an HTML tag which allows you to create an element out of inline text. It doesn’t mean anything! try it:
ADVANCED CSS William Neely CEO, Piecewise.com. CSS FONTS AND TEXT CSS ‣ Line-height allows to indicate the amount of space between lines; allows for equal.
Unit 20 - Client Side Customisation of Web Pages
Tutorial 6 Creating Fixed-Width Layouts
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Tutorial 4 Creating Special Effects with CSS
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
XP Tutorial 7New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks.
Tutorial 4 Creating Special Effects with CSS. XP Objectives Work with CSS selectors Create styles for lists Create and apply class styles Create a rollover.
CSS Positioning Creating Special Effects with CSS CS202 Working with Cascading Style Sheets (Chapter 4) CS202 1.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Doman’s Sections Information in this presentation includes text and images from
CIS 1315 – Web Development for Educators CIS 1315 HTML Tutorials 3 & 4: Working With CSS.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Tutorial 7.
Chapter 6 Introducing Cascading Style Sheets Principles of Web Design, 4 th Edition.
Week 8 – Part 2 Page Layout Basics Key Concepts 1.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
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.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
Tutorial 4 Creating Special Effects with CSS. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Work with CSS selectors.
Tutorial 4 Creating Special Effects with CSS. XP Objectives Work with CSS selectors Create styles for lists Create and apply class styles Create a rollover.
CONTROLLING Page layout
Understanding CSS Cascading Style Sheets control the presentation of content in HTML pages Style Sheets separate formatting from the content –Styles defined.
HTML 5 AND CSS Dr Mohd Soperi Mohd Zahid Semester /16.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
CSS.
Laying out Elements with CSS
Working with Cascading Style Sheets
Web Development & Design Foundations with HTML5 7th Edition
>> The “Box” Model
Advanced CSS BIS1523 – Lecture 20.
Web Systems & Technologies
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
Basics of Web Design Chapter 7 Page Layout Basics Key Concepts
6 Layout.
Laying out a website using CSS and HTML
Web Development & Design Foundations with HTML5 8th Edition
Web Development & Design Foundations with H T M L 5
Web Development & Design Foundations with HTML5
Tutorial 4 Creating Special Effects with CSS
Web Development & Design Foundations with HTML5
Laying out Elements with CSS
Presentation transcript:

CIS 1310 – HTML & CSS 6 Layout

CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning with CSS  Create Column Page Layouts using CSS  Create Navigation Utilizing Lists with CSS  Add Interactivity to Links with CSS Pseudo-classes  Utilize Additional HTML5 Structural Elements

CIS 1310 – HTML & CSS Box Model  Describes Rectangular Boxes that Contain Content Each Block-level Element is Displayed as a Box Each Content Box can have Margins, Borders, & Padding

CIS 1310 – HTML & CSS Margin Properties  margin: # | % Shorthand Property Sets All Four Individual Margins

CIS 1310 – HTML & CSS Margin Properties  margin-left | margin-right | margin-top | margin- bottom: # | % Negative margins can be set to achieve special effects

CIS 1310 – HTML & CSS Positioning Properties  position: type position size type = static | relative | absolute | fixed position = top | left | bottom | right size = height | width

CIS 1310 – HTML & CSS Positioning Properties  div {position:absolute; left:130px; top:100px;}

CIS 1310 – HTML & CSS Positioning Properties  div {position:absolute; left:130px; top:100px; width: 100px;}

CIS 1310 – HTML & CSS Positioning Properties  width: # | % Sets Horizontal Width of a Containing Box  height: # | % Sets Vertical Height of a Containing Box  float: left | right | none Sets Position of an Element to Left/Right of Parent Element  clear: none | left | right | both Controls Flow of Text Around Floated Elements

CIS 1310 – HTML & CSS Positioning Properties  float & clear

CIS 1310 – HTML & CSS Positioning Properties  overflow: visible | hidden | scroll | auto Defines Situation Where Content Overflows Allotted Space

CIS 1310 – HTML & CSS Positioning Properties  clip: rect(top, right, bottom, left) Defines Area Through Which Content Can be Viewed

CIS 1310 – HTML & CSS Positioning Properties  visibility: visible | hidden Specifies Whether an Element is Displayed or Hidden  z-index: auto | # Specifies an Element’s Stacking Level

CIS 1310 – HTML & CSS CSS Two-Column Layout

CIS 1310 – HTML & CSS Visual Formatting Model  Element Display Type Categories Block (e.g., Paragraphs) Contain Inline Boxes that Contain Element Content Flex (Chapter 7) Inline Contain Content within the Block-level Elements Do not Form New Blocks of Content List-item Creates Surrounding Container and List-item Inline Boxes display: block | flex | inline | list-item | none

CIS 1310 – HTML & CSS List Navigation  Remove List Marker, Underline, Add Padding  Configure List Items for Inline Display #nav ul { list-style-type: none; } #nav a { text-decoration: none; padding-right: 10px; } #nav li { display: inline; } … Home Menu Directions Contact

CIS 1310 – HTML & CSS Advanced Selection  Attribute Selector Applies to Elements with Specific Attributes  Syntax: a[href] {color: blue;} a:hover img[src=“CODLogo.gif"] {visibility:hidden;}

CIS 1310 – HTML & CSS Advanced Selection  Pseudo-Class Selectors Select Elements Based on Characteristics Other Than Name Link Pseudo-Classes :link Allow Modification of Style Characteristics for Unvisited Links :link {color: green;} :visited Allow Modification of Style Characteristics for Visited Links :visited {color: green;}

CIS 1310 – HTML & CSS Advanced Selection  Pseudo-Class Selectors Dynamic Pseudo-Classes Apply Styles to an Element Based on User’s Actions :hover Applies Style When User Mouses Over Element :active Applies Style When User Activates Element :focus Applies Style When Element is Accepting User Input

CIS 1310 – HTML & CSS Advanced Selection  Pseudo-Elements Selectors Modify Aspects of Document Not Classified by Elements :first-letter Apply Style Rules to the First Letter of Any Block-level Element Initial Capitals Drop Capitals

CIS 1310 – HTML & CSS Advanced Selection  Pseudo-Element Selectors :first-letter

CIS 1310 – HTML & CSS Advanced Selection  Pseudo-Element Selectors :first-line Apply Style Rules to the First Line of Any Block-level Element

CIS 1310 – HTML & CSS Advanced Selection  Child Selector > Apply Style Rules to Child Elements of Any Parent div > blockquote {font-weight: bold;}

CIS 1310 – HTML & CSS Advanced Selection  First Child :first-child Apply Style Rules to the First Child Element of a Parent div > p:first-child {font-weight: bold;}

CIS 1310 – HTML & CSS Advanced Selection  Adjacent Sibling + Apply Style Rules to Elements that Share the Same Parent Are Adjacent in the Code

CIS 1310 – HTML & CSS Structural Elements 5  … Contains Headings of a Page, Section, or Article  … Contains Two or More Heading Elements Lighthouse Island Bistro the best coffee on the coast

CIS 1310 – HTML & CSS Structural Elements 5  … Contains a Section of Navigation Links Block Display  … Contains Footer Content Block Display  … Contains Sidebar, Note, or Other Tangential Content Block Display

CIS 1310 – HTML & CSS Structural Elements 5  … Contains a “Section”, (e.g., a Chapter or Topic) Block Display  … Contains an Independent Entry, (e.g., Blog Posting or Comment) Block Display  … Represents Date or Time (e.g., Date Articles or Blogs) Inline Display

CIS 1310 – HTML & CSS Debugging Techniques  Use a Validator  Configure Temporary Background Color / Border Assign to Element to Determine Page Area Issue  Use HTML Comments to Identify Problem Area  Use CSS Comments to Identify Problem Area Cascade Conflicts