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.

Slides:



Advertisements
Similar presentations
CSS Layout Crash Course An Advance CSS Tutorial. Inline vs. Block Many HTML elements have a default display setting of Block. Block elements take up the.
Advertisements

Very quick intro HTML and CSS. Sample html A Web Title.
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.
1 Pengantar Teknologi Internet W03: CSS Cascading Style Sheets.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
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:
Cascading Style Sheets Color and Background Controls Border and Margin Controls (Boxes)
Tutorial 4: Creating page layout with css
Week 9 Using the Box Properties. 9-2 The CSS Visual Formatting Model Describes how the element content boxes should be displayed by the browser –Based.
Tutorial 4: Creating page layout with css
CS4370/6370 Web Development Cascading Style Sheets (CSS)
Week 7 Web Typography. 2 Understanding Type Design Principles.
Text Properties, Line Box, CSS. Text Properties Properties related to the display of text. Text-align : left, right, center I like FSU!
Web Design & Development Cascading Style Sheets (CSS)
Introducing Cascading Style Sheets  Cascading Style Sheet Basics  Creating Styles  Using Styles  Manipulating Styles  Text Formatting with CSS.
Chapter 7 Using Advanced Cascading Style Sheets HTML5 & CSS 7 th Edition.
MORE Cascading Style Sheets (The Positioning Model)
Selectors thru Borders. CSS – Cascading Style Sheets – is a way to style HTML HTML is the content base of a web page CSS provides the presentation qualities.
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.
Principles of Web Design 6 th Edition Chapter 4 – Cascading Style Sheets.
LING 408/508: Programming for Linguists
Chapter 7 Web Typography Principles of Web Design, 4 th Edition.
CSS Positioning Creating Special Effects with CSS CS202 Working with Cascading Style Sheets (Chapter 4) CS202 1.
CSS The Definitive Guide Chapter 8.  Allows one to define borders for  paragraphs  headings  divs  anchors  images  and more.
INTRODUCTION TO HTML5 Styling Text. Change the Font Size  You can use the font-size property to change the font size for a document’s text.  Instead.
Chapter 12 Cascading Style Sheets: Part II The Web Warrior Guide to Web Design Technologies.
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.
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.
COMP213 – Web Interface Design
 2008 Pearson Education, Inc. All rights reserved Cascading Style Sheets™ (CSS)
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
 Cascading Style Sheets (CSS) ◦ Used to specify the presentation of elements separately from the structure of the document.  Inline style ◦ declare.
CSS Class 2 -Add margins to elements on a page. -Set width and height of elements. - CSS shorthand properties for box model. -Style links. -Style tables.
Week 8 – Part 2 Page Layout Basics Key Concepts 1.
Cascading Style Sheets Eugenia Fernandez IUPUI. CSS Purpose CSS allow you to specify the style in which your XML elements are displayed. CSS were originally.
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
1 CS428 Web Engineering Lecture 08 Border, Margin, Padding … (CSS - III)
LING 408/508: Programming for Linguists Lecture 10 September 30 th.
CSS Fun damentals The Document Hierarchy Element Relationships The Box Model.
CIS234A Lecture 5 Instructor Greg D’Andrea. Font Styles Review Font-Family: generic family, font family Font-Size: em, pt, px, %, mm, cm, in Font-Style:
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.
Tutorial 4 Creating Page Layouts with CSS
CSS: Cascading Style Sheets Part II. Style Syntax.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring 2016 CSS Positioning 1.
Understanding CSS Cascading Style Sheets control the presentation of content in HTML pages Style Sheets separate formatting from the content –Styles defined.
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.
CS 120: Introduction to Web Programming Lecture 10: Extra Features and Website Design Part 1 Tarik Booker CS 120 California State University, Los Angeles.
Cascading Styles Sheets Positioning HTML elements.
CSS Introductions. Objectives To take control of the appearance of a Web site by creating style sheets. To use a style sheet to give all the pages of.
Laying out Elements with CSS
The Box Model in CSS Web Design – Sec 4-8
Cascading Style Sheets™ (CSS)
The Box Model in CSS Web Design – Sec 4-8
The Box Model in CSS Web Design – Sec 4-8
Chapter 7 Page Layout Basics Key Concepts
Cascading Style Sheets
The Internet 10/13/11 The Box Model
CSS Borders and Margins.
MORE Cascading Style Sheets (The Positioning Model)
How to use the CSS box model for spacing, borders, and backgrounds
Cascading Style Sheets
CSc 337 Lecture 5: Grid layout.
Cascading Style Sheets™ (CSS)
Presentation transcript:

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 classes, pseudoclasses, & divisions  Printing using CSS

 Line Height – control vertical spacing between lines of text.  Expressed by: ▪ Number: font-sized specified ▪ Length : em, pt, px, etc. with the length value to set a fixed height ▪ Percentage: based on the font-sized specified.

 The em adapts automatically to the font size that the Web page visitor uses.  1em = to the current font size  2em is 2 times the size of the current font

 All HTML elements can be considered as boxes.  The CSS box model is a box that wraps around HTML elements consisting of: margins, borders, padding, and the actual content.

 Margin – the space between the element and other content on the page  Border – what surrounds the element (content)  Padding – space between the content and the border

 Shorthand property – allows a Web developer to shorten the code. PaddingResults padding: 25px 50px 75px 100px; top, right, bottom, left padding: 25px 50px 75px; top, right /left, bottom padding: 25px 50px; top/bottom, right/left padding: 25px; all sides * Margins will work in the same manner

 Position an element on the Web page  If not used, the elements will display on the page in the order in which they appear..menu ul {display: none; position: absolute; background-color: white; margin: 2px 5px 5px 0;} class Position property Margin shorthand

ValueDescription AbsolutePositioned relative to the first parent element that has a position other than static FixedRelative to the browser window RelativeRelative to its normal position. Ex. – “left: 10” adds 10 pixels to the left position StaticDefault; no position; normal flow InheritValue of the position property should be inherited from the parent element * Red values are absolutely positioned elements

 Used to give blocks of text and graphics rounded corners p.box{width: 400px; margin-left: 20px; margin-top: 50 px; border-radius: 5px; padding: 10px ; background-color: white; }

 Allows users to print the content of the page without the navigation bar.  Page Box - area that contains 2 areas: the page and margin.  Page area: the boxes (elements) laid out on the page  Margin area: surrounds the page area.

 contains followed by an optional page { {margin: 0.5in;}

Chapter 7 folder – jaredadam.html

Highlight: <!— body{font-family: Verdana, Arial; background-color: #303032;} a{text-decoration: none; color: #303032;} #menubar{background-color: #303032; color: white; height: 40px;}.menu{float:left; padding: 0.6em 3em 0.1em 0.5em; cursor: default;}

.menu ul{display: none; position: absolute; background-color: white;list-style: none; margin: 2px 5px 5px 0; padding: 0;}.menu ul li{display: block; font-size: small; padding: 0.2em} div.menu:hover ul{margin:0; padding: 0; display: block; background-color: white; color: #303032} div.menu ul li:hover{background-color: #cccccc;}

.whitepipe{color: white;} p.box{width: 400px; margin-left: 20px; margin-top: 50px; border-radius: 5px; background-color: white; padding: 10px; color: #303032;} img.posit{position: relative; left: 460px; top: -270px} -->

img.small{text-decoration: none;} /* displays text decoration around images on the left */ div#sizes a img.large {height: 0; width: 0; border-width: 0;} /* hide the large image by setting its height and width to zero */ div#sizes a:hover img.large{position: absolute; top: 68px; left: 170px; height: 389px; width: 500px;} /* make the larger image appear on the right when a user hovers over the smaller image on the left */

p{margin-bottom: 26px; margin-top: 26px; font-size: small; font-family: Verdana, Arial; color: #100375;} /* add bottom and top margins to p elements so they are aligned with the large image */ Save as stylesch7.css

 Add in code to link the new CSS document to waterfall.html AND whale.html.

@page{margin: 0.5in;} /* set printed page with half inch margins */ #menubar{display: none;} /* do not print the menubar that displays at the top of the Web page */.box{text-align: left; font-size: 12pt; font-family: Times New Roman;}.posit{border-width: 0px; width: 7.125in; height: 5.361in;} /* specific styles set for paragraph box and image posit classes */ Save as printpage.css

 Open back up jaredadam.html and add the code to link printpage.css to it.