Cascading Style Sheets II Robin Burke ECT 270. Outline Midterm solution CSS review CSS selection selectors pseudo-classes classes, ids div and span Final.

Slides:



Advertisements
Similar presentations
Table, List, Blocks, Inline Style
Advertisements

1 Cascading Style Sheets Continued Different kinds of selectors in a style sheet –Simple- Pseudo-Class –Contextual- Pseudo-Element –Class Image Styles.
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:
กระบวนวิชา 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.
XP Introducing Cascading Style Sheets With Cascading Style Sheets (CSS), you can create one or more documents that control the appearance of some or all.
Cascading Style Sheets Scripting with Style. CSS versus HTML  Ways to format in HTML –HTML Tag extensions –Converting Text to images –Page Layout with.
CSS Basics LIS Webteam April 8, Why CSS? What’s wrong with HTML? Structure vs Style Early web design used hacks to style webpages with HTML – like.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
MORE Cascading Style Sheets (The Positioning Model)
Cascading Style Sheet (CSS) Instructor: Dr. Fang (Daisy) Tang
4.01 Cascading Style Sheets
Cascading style sheets - CSS
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
CSS: Cascading Style Sheets. 2 History HTML tags were originally designed to define the content of a document. The layout of the document was supposed.
Principles of Web Design 6 th Edition Chapter 4 – Cascading Style Sheets.
Working with Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of a document.
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.
Cascading style sheets (CSS)
Dreamweaver -- CSS. Dreamweaver -- MX New icons are added in MX Most of the features commonly used in web design, and are same as FrontPage. New feature.
Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.
WORKING WITH CASCADING
New Perspectives on XML, 2nd Edition Tutorial 5 1 TUTORIAL 5 WORKING WITH CASCADING STYLE SHEETS.
XP New Perspectives on XML Tutorial 5 1 TUTORIAL 5 CSS Tutorial – Carey ISBN
Doman’s Sections Information in this presentation includes text and images from
CSS: Cascading Style Sheets. 2 What are Style Sheets A style sheet is a mechanism that allows to specify how HTML (/XHTML/XML) pages should look The style.
Cascading Style Sheets by Pavlovic Nenad by. Presentation Contents  What is CSS?  Why CSS?  Types of Style Sheets  Style Sheets Syntax  Box Formatting.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Cascading Style Sheets CSS by Pavlovic Nenad by. 2Cascading Style Sheets Presentation Contents What are CSS? What are CSS? History of CSS History of CSS.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 7.
Tutorial #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
Introduction to CSS. What is CSS?  Cascading Style Sheets  Used for styling HTML  Also important in javascript and jquery for selectors  External.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 7.
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.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Tutorial 7.
Css. Definition Cascading style sheet (CSS)  It is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
Lecture 2 - HTML and CSS Review SFDV3011 – Advanced Web Development 1.
XHTML and CSS. The Browser The browser is not print!
Cascading Style Sheets Robin Burke ECT 270. Outline Midterm The Layout Debate CSS properties Fonts Alignment Color CSS selection selectors pseudo-classes.
ECA225 Applied Interactive Programming Cascading Style Sheets, pt 1 ECA 225 Applied Online Programming.
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.
Cascading Style Sheets Robin Burke ECT 360. Outline Midterm CSS CSS selection Positioning SVG Final project.
Course created by Sarah Phillips BBCD Melbourne BAPDCOM Version 1 – April 2013.
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
Introduction to CSS September 20, Introduction Cascading Style Sheets (CSS) –Separation of structure from presentation CSS guide and tutorial.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
5 th ed: Chapter 4 4 th ed: Chapter 5 SY306 Web and Databases for Cyber Operations Slide Set #4: CSS.
Intro to CSS Christy. What is CSS?  Cascading Style Sheets  Separates content from presentation  Defines how to display HTML elements  Provides control.
CSS: Cascading Style Sheets Part II. Style Syntax.
Introduction to Programming the WWW I CMSC Summer 2003 Lecture 6.
NASRULLAHIBA.  It is time to take your web designing skills to the next level with Cascading Style Sheets (CSS). They are a way to control the look and.
ECA 228 Internet/Intranet Design I Cascading Style Sheets.
Chapter 11 & 12 CSS Style Sheets: Intro. Why CSS? Separate presentation from content – more accessible Less work – can change appearance of whole site.
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 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.
Cascading Style Sheets Robin Burke ECT 270. Outline CSS properties Fonts Alignment Color CSS selection selectors.
Creating Web Documents CSS examples (do more later) Lab/Homework: Read chapters 15 & 16. Work on Project 3, do postings.
CONFIGURING COLOR AND TEXT WITH CSS Chapter 3. Cascading Style Sheets (CSS) Used to configure text, color, and page layout. Launched in 1996 Developed.
CSS.
Cascading Style Sheets
Working with Cascading Style Sheets
CSS Layouts: Positioning and Navbars
Advanced CSS BIS1523 – Lecture 20.
MORE Cascading Style Sheets (The Positioning Model)
Exercise 9 Skills You create and use styles to create formatting rules that can easily by applied to other pages in the Web site. You can create internal.
Presentation transcript:

Cascading Style Sheets II Robin Burke ECT 270

Outline Midterm solution CSS review CSS selection selectors pseudo-classes classes, ids div and span Final project

Midterm solution

Style aspects of the page that describe its appearance, but not its logical structure Examples fonts colors positioning alignment

Cascading Style Sheets Separate style from HTML content Different ways to use in-line embedded linked Linked style most flexible

CSS Syntax selector { attribute:value; } Example h1 { font-color:blue; } Multiple attribute/values pairs possible

Fonts Typical styles for fonts font-family color font-weight background-color font-style font-decoration

Colors / Backgrounds Can use colors and backgrounds in more ways than possible in HTML background of any item Can specify color using rgb directly without hex triplet Can control tiling of background

Selectors CSS properties and values provide features to be controlled Selectors specify where in the document those styles will be applied

Types of selectors element names h1 { font-family: Courier, monospace; } element containment table tr th a { font-decoration: none; } pseudo-classes a:visited { color: blue; } not widely-available >, +, [attribute="value"]

Pseudo-elements pseudo-elements selectors ≠ HTML elements still = logical structure Example p:first-letter { color: red; } Not widely available :before, :after

Classes Selectors with user-defined behavior usually in conjunction with HTML element Inside HTML element class attribute In CSS selector = element_name.class_name Also.class_name for same class in different elements Example yes/no list items

Classes While writing HTML Identify different areas of page requiring different treatment Come up with descriptive class names for each Insert class attribute in HTML elements While writing CSS create styles for each class associate with appropriate class selector

Id Also a selector but unique to a single element Example #sidebar { background-color: grey; }

Generic blocks How to identify a chunk of content that is not an HTML element already Two options paragraph-like? Use "div" block format word-like? Use "span" in-line format

Examples

Positioning With CSS, we can control where an element appears Tables for layout not necessary in theory

Box model padding border margin Block-level element

Positioning Options normal blocks stacked vertically in-line arranged horizontally with wrapping relative calculate where the block should have been and apply offset absolute put block at a precise position float make block independent and wrap other content around it

Layering Boxes can overlap each other transparent regions will show through To achieve negative margin absolute or relative position on top

Examples layering with margins layering with absolute positioning

Frames We can get "frame-like" appearance with absolute positioning

Example Frame

Exercise

Elements bullet.gif picture7.gif circlesbg.gif confetti.gif

Final Project Tourism site Requirements (9 pages total) Home page Order form Slide show Presentation 6/9 Must use CSS Javascript

Final Project Milestones 5/12 Proposal: destination / team members 5/26 Last day for design review 6/9 Presentations (8:45 am) Must all be present