1.NET Web Forms CSS: Style Sheets © 2002 by Jerry Post.

Slides:



Advertisements
Similar presentations
Cascading Style Sheets (CSS): Pixel-Level Control with HTML Ease
Advertisements

Part 3 Introduction to CSS. CSS Text Text Styles h1 {color: green} // rgb(0,255,0), #00ff00 h2{letter-spacing: 0.5cm} // 2px h3 {text-align: right} //
9-May-15 More CSS. 2 A different emphasis CSS is the same for XML as it is for HTML and XHTML, but-- XML contains no display information If you want your.
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.
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
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.
Basics of Web Design Chapter 6 More CSS Basics Key Concepts 1.
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)
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
1 CSS Styling with Fonts and Colors. 2 CSS Cascading Style Sheets and fonts CSS provides Style or Presentation options for our html pages CSS properties.
Cascading Style Sheets (CSS) Why do we need them? Separate structure from browser presentation There are many HTML presentation attributes –We want to.
14-Jul-15 CSS Applications to XML. 2 A different emphasis CSS is the same for XML as it is for HTML, but-- HTML already does a pretty good job of layout.
Lecture CSS: Cascading Style Sheets. What are Styles? Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics.
CSS Properties on Parade PropertyValid valuesExample font-familylist of fonts (separate with commas, end with generic font: serif, sans-serif, fantasy,
3.1 Cascading Style Sheets. Motto Fashions fade, style is eternal. —Yves Saint Laurent.
+ Text & Font Styles Unit 3 Lesson Different Font Categories Sans Serif – block style fonts Example - Rockwell Easy to read and good to use when.
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.
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).
Cascading Style Sheets Example
Cascading Style Sheets CS3505. What are CSS? Method for adding style attributes consistently to HML tags Cascading because styles are applied in order.
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
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
1 Cascading Style Sheets (CSS) Part 2. 2 The Sources of Style Sheets.
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.
Cascading Style Sheets " Provide means to control and change presentation of HTML documents. " Allow the user to impose a standard style. " Three levels.
Chapter 3 Cascading Style Sheets Introduction  The CSS1 specification was developed in 1996  CSS2 was released in 1998  CSS3 is on its way 
CSS – Cascading Style Sheets Fred Durao
CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets.
Cascading Style Sheets Chapter Four. What are they? A set of style rules that tell the web browser how to present a web page or document. Cascading Style.
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.
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.
 2008 Pearson Education, Inc. All rights reserved Cascading Style Sheets™ (CSS)
Creating Your Own Webpage COSC Cascading Stylesheets Think of: HTML: content of your webpage HTML has tags CSS: presentation and appearance of your.
>> The “Box” Model. Pre-requisite Create a new project in Netbeans called Week5 Create a new html file and name it box.html Create a new css file and.
 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!
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)
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.
©SoftMoore ConsultingSlide 1 Introduction to HTML: Cascading Style Sheets.
CSS – Cascading Style Sheets
5 th ed: Chapter 4 4 th ed: Chapter 5 SY306 Web and Databases for Cyber Operations Slide Set #4: CSS.
CSS for Styling CS The good, the bad and the… ugly!  Tags such as b, i, u, and font are discouraged in strict XHTML  Why is this bad? CS380 2.
Web Design (14) CSS Formatting Text. Formatting Text In Brackets, go to your ‘externalcss’ website and find the ‘formattingtext’ page. Use the ‘main’
CSS Cascading Style Sheets *referenced from
CSS Box Model. What is the Box Model? Each XHTML element appearing on our page takes up a "box" or "container" of space. Each box size is affected not.
ECA 228 Internet/Intranet Design I Cascading Style Sheets.
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,
Chapter 11 & 12 CSS Style Sheets: Intro. Why CSS? Separate presentation from content – more accessible Less work – can change appearance of whole site.
CS 120: Introduction to Web Programming Lecture 10: Extra Features and Website Design Part 1 Tarik Booker CS 120 California State University, Los Angeles.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 3 Introducing Cascading Style Sheets.
1 CS428 Web Engineering Lecture 07 Font, Text & Background (CSS - II)
CSS Details Cascading Style Sheets. Lesson Overview  In this lesson, you will learn:  To use CSS properties for fonts  Evaluate whether to use pts,
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,
Unit 3 - Review. Topics 1. Tag, Attribute, Value 2. CSS Rule Syntax + link 3. Categories of Selectors 4. Inline vs Block Tags 5. CSS Layout 6. CSS Box.
Creating Your Own Webpage
Cascading Style Sheets (Formatting)
The Internet 10/13/11 The Box Model
Cascading Style Sheets
Presentation transcript:

1.NET Web Forms CSS: Style Sheets © 2002 by Jerry Post

2 The Power of Style Sheets  A style sheet holds layout and element style definitions for an entire website in one location.  With a few simple changes, you can instantly alter the appearance of every page in your website.  Styles provide vastly more control over layout than HTML.  The style sheet separates your design from the HTML and the code, making it easier to understand and alter all three. HTML pages linked to Single style sheet. Styles

3 The style sheet holds a formal description of the page layout and individual element styles. By defining the styles in one location, you can instantly change the style for every page with a few changes. MyStyles.css File.html

4 Some Style Options font color background margin-left margin-right text-decoration text-indent

5 Styles: Fonts font-familyserif, sans-serif, cursive, fantasy, monospace font-family: "New Century Schoolbook", Times, serif font-stylenormal, italic, oblique font-variantnormal, SMALL-CAPS font-weightnormal, bold, bolder, lighter, 100, 200, …, 900 font-size10pt (px, pc, in, cm) (points, pixels, picas, inches …) fontcombines other attributes fontfont: italic bold 12pt/14pt Times, serif

6 Styles: Colors color(see below) background-color(see below) background-imageURL, none background-repeatrepeat, repeat-x, repeat-y, no-repeat background-attachmentscroll, fixed background-positionleft, center, top, bottom, right backgroundcombines others aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow. #rrggbb (e.g., #00ad00) #rgb (e.g., #0a0) rgb(x,x,x) x is an integer between 0 and 255 (e.g., rgb(0,107,0)) rgb(y%,y%,y%) y is between 0.0 and (e.g., rgb(0%,70%,0%))

7 Styles: Text word-spacing0.2em letter-spacing0.1em text-decorationnone, underline, overline, line-through, blink vertical-alignbaseline, sub, super, top, text-top, middle,… text-transformnone, Capitalize, upper-case, lower-case text-alignleft, right, center, justify text-indentlength or percentage line-heightpercentage or number

8 Styles: Box margin-top margin-right margin-bottom margin-left margin padding-top padding-right padding-bottom padding-left padding border-top-width border-right-width border-bottom-width border-left-width border-width border-color border-style border-top border-right border-left border width height floatwrap text cleardon’t wrap

9 Styles: Lists displayblock, in-line, list-item, none white-spacenormal, pre, nowrap list-style-typedisc, circle, square, decimal, lower-roman, upper-roman, lower-alpha, upper-alpha, none list-style-imagenone, URL list-style-positioninside, outside list-stylecombine others

10 Styles and Tags  You generally build styles for common HTML tags.   …  This technique means pages use standard HTML tags, and you can instantly alter the style and appearance.  You can also create custom styles that can be applied in individual situations. Generally, you create a style Class.  Message in a different color

11 Example BODY { margin-left: 0px; font: 9pt/11pt "Times New Roman", Times, serif; color: black; text-align: left; background-color: white; background: transparent; } P { margin-left: 0px; font: 9pt/11pt "Times New Roman", Times, serif; color: black; background: transparent; } H1 { margin-left: 0px; font: 18pt/18pt "Times New Roman", Times, serif; color: black; font-weight: bold; background: transparent; }

12 Creating Style Sheets  They are text files, but it is hard to remember all of the attributes.  Use a style sheet editor, like Visual Studio.  Right-click on an item to add a style.  Right-click on a style to build/edit it.

13 Style Sheets in Visual Studio  Choose a category  Select the attributes.  Whenever possible, use relative sizes such as em instead of pixels.  Link the style sheet to an HTML/ASPX page by dragging and dropping the style sheet on the page.

14 Sizes and Positions  Style sheets highlight the issue of sizes and positioning.  Historically, most pages describe sizes and locations in terms of pixels. Many systems (including aspects of Visual Studio) still use pixels.  The problem is that hardware technology is changing.  Ultra-high resolution screens are appearing that can displays 200 pixels per inch.  Anything measured in pixels will be too small. Imaging trying to see a line that is 1-pixel or 1/200 of an inch wide.  Low-resolution screens like cell phones are a similar problem.  Visually-impaired people also often set large font sizes, that you should never override.  Possible solutions  The print world uses points (1/72 of an inch) or picas (1/6 of an inch), but they do not translate well to computer screens.  Use relative scaling such as em (often pixels), this approach is relative because it adjusts to the user’s default font size.

15

16