CSS in XHTML continued Please use speaker notes for additional information!

Slides:



Advertisements
Similar presentations
Cascading Style Sheets
Advertisements

Measurement Many CSS properties (values within the declaration) require that you specify a unit of measurement, such as spacing between elements, border.
1 Dynamic HTML: Cascading Style Sheets™ (CSS). 2 Introduction Cascading Style Sheets (CSS) –Specify the style of your page elements –Spacing, margins,
1 XHTML Cascading Style Sheets™ (CSS). 2 Inline.html 1 2
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
 2002 Prentice Hall, Inc. All rights reserved. Chapter 4 – Cascading Style Sheets (CSS) Outline 4.1Introduction 4.2Inline Styles 4.3Creating Style Sheets.
Cascading Style Sheets Please use speaker notes to get complete information! Cascading Style Sheets.
CS4370/6370 Web Development Cascading Style Sheets (CSS)
CASCADING STYLE SHEETS CSS. 2 What CSS means?  CSS is an extension to basic HTML that allows you to style your web pages.  It separates the part that.
Text Properties, Line Box, CSS. Text Properties Properties related to the display of text. Text-align : left, right, center I like FSU!
Cascading Style Sheets SP.772 May 6, CSS Useful for creating one unified look for an entire web site. Helps to seperate style from content. Can.
Web Design & Development Cascading Style Sheets (CSS)
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
Style sheets can also affect the BODY. style4.css BODY {BACKGROUND-COLOR : white} H1 {COLOR : red; FONT-SIZE : 50; FONT-FAMILY : arial} H2 {COLOR : green}
Style sheets can also affect the body. style4.css body {background-color : white} h1 {color : red; font-size : 50; font-family : arial} h2 {color : green}
Lecture CSS: Cascading Style Sheets. What are Styles? Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics.
Using color and fonts in HTML and XHTML Please use speaker notes for additional information!
3.1 Cascading Style Sheets. Motto Fashions fade, style is eternal. —Yves Saint Laurent.
CSS1-1 Cascading Style Sheets (CSS) Xingquan (Hill) Zhu
HIGHER COMPUTING CSS. WHAT IS CSS? CSS: Cascaded Style Sheets used to separate a web site’s content(information) from its style(how it looks).
TECH2018 Multimedia and the Internet More about CSS and Page Layouts.
CSS Dvijesh Bhatt.
HTML - Quiz #2 Attendance CODE:
Cascading style sheets (CSS)
Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.
Cascading Style Sheets, pt 2 ECA 225 Applied Online Programming.
Cascading Style Sheets CSS. CSS - Structure Declaration block Property: identifies what to change Value: how to change it Selector – example h1{ font-size:
WORKING WITH CASCADING
WRT235: Writing in Electronic Environments CSS Backgrounds, colors, fonts.
Doman’s Sections Information in this presentation includes text and images from
ITCS373: Internet Technology Week 3: Introduction to CSS Dr. Faisal Al-Qaed.
CIS67 Foundations for Creating Web Pages Professor Al Fichera Rev. September 14, 2010—All HTML code brought to XHTML standards. Reference for CIS127 and.
Getting Started with HTML Please use speaker notes for additional information!
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using Style Sheets.
Class three: CSS review, backgrounds, font formatting, the box model.
Tutorial #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
11/6/13 MORE CSS!. TODAY’S AGENDA Review: float for positioning objects Review: CSS and color Introductions to: o CSS and images o CSS backgrounds o CSS.
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.
Stylin’ with CSS Monday October 8 th and Tuesday October 9 th.
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.
More CSS.
Web Design and Development for Business Lecture 4 Cascading Style Sheet (CSS)
 2008 Pearson Education, Inc. All rights reserved Cascading Style Sheets™ (CSS)
INTRODUCTORY Tutorial 4 Exploring Graphic Elements and Images.
Creating Your Own Webpage COSC Cascading Stylesheets Think of: HTML: content of your webpage HTML has tags CSS: presentation and appearance of your.
Tables with XHTML Please use speaker notes for additional information!
 Cascading Style Sheets (CSS) ◦ Used to specify the presentation of elements separately from the structure of the document.  Inline style ◦ declare.
CSS with XHTML Please use speaker notes for additional information!
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
REEM ALMOTIRI Information Technology Department Majmaah University.
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.
CSS – Cascading Style Sheets
Lecture 2: Cascading Style Sheets (CSS) Instructor: Dr. M. Anwar Hossain.
Cascading Style Sheets Web Design Fairport High School.
5 th ed: Chapter 4 4 th ed: Chapter 5 SY306 Web and Databases for Cyber Operations Slide Set #4: CSS.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
Web Design (15) CSS Opacity, Link Colours & Background Images.
CIS234A Lecture 6 Instructor Greg D’Andrea. Span and Div The span and div elements are a generic means by which we can add structure to documents. The.
ECA 228 Internet/Intranet Design I Cascading Style Sheets.
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.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
1 CS428 Web Engineering Lecture 07 Font, Text & Background (CSS - II)
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,
Creating Your Own Webpage
Presentation transcript:

CSS in XHTML continued Please use speaker notes for additional information!

cssAx.html body { font-family: "Times New Roman", "Times Roman", serif; color: green; background: pink; margin-top: 1.5in; margin-left:.5in; margin-right:.5in } p { text-indent:.5in; margin-top:.25in; color: blue } p b { color: purple; } table { background: white; } td { color: purple; } h1, h2, h3 { font-family: Helvetica, Arial, sans-serif; color: red; } cssBx.html blockquote { color: #EEAABB; font-style: italic; font-size: 48pt; } h1, h2, h3 { font-family: Helvetica, Arial, sans-serif; color: blue; text-decoration: underline; text-transform: uppercase; font-size: 36pt; }.tocenter { text-align: center; color: pink; }.toright { text-align: right; color: orange; font-style: italic; font-weight: bold; }

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " More "cssBx.css"; h1 {color: yellow; background: green;} table { border: solid thick; padding: 10; border-color: purple; } td, th { border: solid thin; } Header 1 Header 2 Header 3 Header 4 We are now testing the sheet to see what will come up. This is a test of a paragraph. I want it to go on for a little while so I am typing a line of comments. Note that text/css defines the language as Cascading Style Sheets and is not required. allows you to use multiple style sheets - they must proceed all other style sheet entries. This is the first cell. And this is another cell.

These are merged cells Note that if a bold is in a paragraph it will be purple because of the P B in cssA. However if a bold is outside a paragraph, it will retain the default color. The P B in the style simply says P that contain the B for bold will have these attributes. This is called using Descendant Selectors. This is a test of that statement - does it work? p b { color: purple; }

Note the first part of this page appears on the previous slide.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " Testing CSS h1 { border: 2px solid; padding: 5px; text-align:center; color:red; } h2 { border: 4px inset; padding: 5px; text-align:center; color:blue; } h3 { border: 4px groove; padding: 5px; text-align:center; color:yellow; background-color:green; } H4 { display:inline; font-size:24 pt; } P { letter-spacing:10pt; } Hello world! This is the first part of the line which now ends. The quick brown fox jumped over the lazy dog Absolute measurements: A pica (pc) is a standard publishing unit that is equal to 12 points. A point (pt) is another standard publishing unit where 1 inch is equal to 72 points Relative measurements: em is the width of M in the font ex is the height of x in the font Pixel (px) is the size of the pixel on the monitor

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " Positioning using CSS body { background: beige; } #cis { z-index: 3; position: absolute; top: 16 px; left: 16 px; } #snow { z-index: 1; position: absolute; top: 16 px; left: 16 px; } #flag { z-index: 2; position: absolute; top: 16 px; left: 16 px; }

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " Positioning using CSS body { background: beige; }.cis { z-index: 2; position: absolute; top: 16 px; left: 16 px; }.snow { z-index: 0; position: absolute; top: 16 px; left: 16 px; }.flag { z-index: 1; position: absolute; top: 16 px; left: 16 px; }

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " Another CSS test using background images body { background-color: beige; color: green; font-size: 1.5em; background-image: url(CISa.gif); background-repeat: repeat-x; background-attachment: scroll; } p { color: blue; font-size: 2em; font-family: sans-serif; }.bright { font-weight: bold; color: red; }.dim { color: brown; }

Here I go with entering information to make multiple lines again and again and again and again and again and again and again and again and again and again and again and again and again and again and I hope this is enough! Here I go with entering information to make multiple lines again and again and again and again and again and again and again and again and again and again and again and again and again and again and I hope this is enough! Here I go with entering information to make multiple lines again and again and again and again and again and again and again and again and again and again and again and again and again and again and I hope this is enough! This data is going to be brighter then the rest! Here I go with entering information to make multiple lines again and again and again and again and again and again and again and again and again and again and again and again and again and again and I hope this is enough!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " Another CSS test using background images body { background-color: beige; color: green; font-size: 1.5em; background-image: url(CISa.gif); background-repeat: repeat-y ; background-attachment: scroll; } p { color: blue; font-size: 2em; font-family: sans-serif; }.bright { font-weight: bold; color: red; }.dim { color: brown; }

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " Another CSS Test body { background-image: url(CISa.gif); background-position: top left; background-repeat: no-repeat; background-attachment: fixed; background-color: beige; color: green; font-size: 1.5em; font-family: serif; } p { color: blue; font-size: 2em; font-family: sans-serif; }.bright { font-weight: bold; color: red; }.dim { color: brown; }

Be aware that many of the advanced features work differently in Netscape and Explorer and in different versions of them. You need to be very sure to check in all versions and types where you wish people to see your work. Also, please take note of my terrible style - these are clearly examples of what not to do. This is how it is supposed to work! Background-position: has possibilities of top, bottom, center, left and right. Background-repeat: has no-repeat, the default of repeat, repeat-x which should tile the image horizontally only and repeat-y which should repeat the image vertically only. Background-attachment: fixed is supposed to leave in place while scroll is supposed to go with the user as they scroll. Try it - try in both navigator and explorer and in different versions - the older versions of the browsers are the problem! SPAN is a way to apply a class to a particular set of things - it works! Note also that em stands for the size of the font. This is how it is supposed to work! Background-position: has possibilities of top, bottom, center, left and right. Background-repeat: has no-repeat, the default of repeat, repeat-x which should tile the image horizontally only and repeat-y which should repeat the image vertically only. Background-attachment: fixed is supposed to leave in place while scroll is supposed to go with the user as they scroll. Try it - try in both navigator and explorer and with a variety of versions! SPAN is a way to apply a class to a particular set of things - it works! Note also that em stands for the size of the font. Here I go with entering information to make multiple lines again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and I hope this is enough! Here I go with entering information to make multiple lines again and again and again and again and again and again and again and again and again and again and again and again and again and again and I hope this is enough! This data is going to be brighter then the rest! Here I go with entering information to make multiple lines again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and I hope this is enough!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " Another CSS Test body { background-image: url(CISa.gif); background-position: top left; background-repeat: no-repeat; background-attachment: scroll; background-color: beige; color: green; font-size: 1.5em; font-family: serif; } p { color: blue; font-size: 2em; font-family: sans-serif; }.bright { font-weight: bold; color: red; }.dim { color: brown; }

This is how it is supposed to work! Background-position: has possibilies of top, bottom, center, left and right. Background-repeat: has no-repeat, the default of repeat, repeat-x which should tile the image horizontally only and repeat-y which should repeat the image vertically only. Background-attachment: fixed is supposed to leave in place while scroll is supposed to go with the user as they scroll. You try it - try in both navigator and explorer - the probelms is frequently older browsers! SPAN is a way to apply a class to a particular set of things - it works! Note also that em stands for the size of the font. This is how it is supposed to work! Background-position: has possibilies of top, bottom, center, left and right. Background-repeat: has no-repeat, the default of repeat, repeat-x which should tile the image horizontally only and repeat-y which should repeat the image vertically only. Background-attachment: fixed is supposed to leave in place while scroll is supposed to go with the user as they scroll. You try it - try in both navigator and explorer and with different versions! SPAN is a way to apply a class to a particular set of things - it works! Note also that em stands for the size of the font. Here I go with entering information to make multiple lines again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and I hope this is enough! Here I go with entering information to make multiple lines again and again and again and again and again and again and again and again and again and again and again and again and again and again and I hope this is enough! This data is going to be brighter then the rest! Here I go with entering information to make multiple lines again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and I hope this is enough!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " Another CSS Test body { background-image: url(CISa.gif); background-position: bottom right; background-repeat: no-repeat; background-attachment: fixed; background-color: beige; color: green; font-size: 1.5em; font-family: serif; } p { color: blue; font-size: 2em; font-family: sans-serif; }.bright { font-weight: bold; color: red; }.dim { color: brown; }

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " Positioning - float body { background-color: beige; color: green; font-size: 1.2em; } div { background-color: pink; color: navy; font-size: 1.4em; width: 75% }.toright { text-align: right; }.tocenter { text-align: center; color: blue; }.tofloat { float: right; color: maroon; width: 30% }

This is an attempt to do more with positioning. It works better in newer browsers and can show output that is very difficult to read in some older browsers. Test and be careful! This is some data within a division. This is some text outside the division. It is in a paragraph which does not have designated style in this page. Notice the division is set up with a width of 75%, so the text-align right within the class will conform to those specifications. This is data aligned using the class set up for that purpose. Now I am going to use the text-align right within a paragraph which does not have any style set for it. This is data in a paragraph that is set up with the text-align right class so it should appear to the right on the screen. Since there are no width constraints on paragraphs it should be all the way to the right. I am getting very careful about closing paragraphs when I play with style even if I am in HTML. This is centered This is centered in a header Notice again the affect of 75% width. When dealing with HTML or XHTML, information is usually loaded on the screen in the order it is presented in the HTML file. Absolute positioning impacts this and removes elements from the default load flow. Floating can also be used. For example, floating can move things to the side so that other things will fill in around the floated element. This is an example of text that is set to float. Here is some text that we are using to test the floated text described above and this needs to go on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and this is get very boring but it still has to go on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on. Now we need to put in some more text to watch it flow, so here goes. Here is some text that we are using to test the floated text described above and this needs to go on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and this is get very boring but it still has to go on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on

This is an example of text that is set to float. Here is some text that we are using to test the floated text discribed above and this needs to go on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and this is get very boring but it still has to go on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on. Now we need to put in some more text to watch it flow, so here goes. Here is some text that we are using to test the floated text discribed above and this needs

and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on. This is the floating text Now we need to put in some more text to watch it flow, so here goes. Here is some text that we are using to test the floated text described above and this needs to go on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and this is get very boring but it still has to go on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on on and on and on.

This is the floating text. and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on on and on and on.

This is the floating text and I am adding enough to make it wrap and then I can see the effects of span. and on and on and on and on and on and on and on and on and on and on and on and on and on This will not flow and go on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on.