Extra-simplified.  Only truly happen when the CSS and HTML are defined as separate files (external style sheet) Introduction The main idea of CSS is.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Cascading Style Sheets Color and Background Controls Border and Margin Controls (Boxes)
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.
Today’s objectives Site performance Padding, Margins, Borders
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
CSS: Class 1 Background Images, Controlling Position of Background Images, Add Padding to Page Elements, Add Borders to Elements on a Page.
Working with Cascading Style Sheets
ITI 133: HTML5 Desktop and Mobile Level I
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 Part 3 Fall, 2007 Modified by Linda Kenney Nov. 12, 2007.
CSS Box Model margin border padding content 23. Box Model Properties PropertyValid valuesExample border-widththin, medium, thick, numberborder-width:
MORE Cascading Style Sheets (The Positioning Model)
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.
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.
Cascading Style Sheets – Block Level. Block Level Style So far we have done text-level CSS With block level CSS, we used a generic container tag Similarly.
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.
Cascading Style Sheets CS3505. What are CSS? Method for adding style attributes consistently to HML tags Cascading because styles are applied in order.
Cascading Style Sheets Billy Toy Cascading Style Sheets Syntax review How to Implement style sheets Background properties Text properties.
LING 408/508: Programming for Linguists
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.
CSS Introduction Cascading Style Sheets Provides a great deal of control over the presentation of the document HTML indicates both semantics of a document.
CSS The Definitive Guide Chapter 8.  Allows one to define borders for  paragraphs  headings  divs  anchors  images  and more.
MCS 270 Cascading Style Sheets (CSS) Gustavus Adolphus College.
CIS 1315 – Web Development for Educators CIS 1315 HTML Tutorials 3 & 4: Working With CSS.
CSS Border.
Today’s objectives  Assignment 1  Padding, Margins, Borders  Fluid Layout page  Building accessible Table  Element size with padding and border 
Css ( CASCADING STYLE SHEETs ) CSS Box Model. All HTML elements can be considered as boxes. In CSS, the term "box model" is used when talking about design.
Cascading Style Sheet Bayu Priyambadha, S.Kom. Definition Cascading Style Sheets (CSS) form the presentation layer of the user interface. –Structure (HTML)
INTRODUCTION TO WEB DEVELOPMENT AND HTML Lecture 10: A Deeper Look at CCS- Spring 2011.
COMP213 – Web Interface Design
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.
Part 4 Introduction to CSS. CSS Table Table Borders table, td, th { border:1px solid black; } Firstname Lastname Bader Ali Paul Manuel The example below.
Creating Your Own Webpage COSC Cascading Stylesheets Think of: HTML: content of your webpage HTML has tags CSS: presentation and appearance of your.
Cascading Style Sheets Chapters 5-6 Color and Background Controls Border and Margin Controls.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Web Foundations THURSDAY, OCTOBER 3, 2013 LECTURE 6: CSS CONTINUED.
>> 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.
1 CS428 Web Engineering Lecture 08 Border, Margin, Padding … (CSS - III)
LING 408/508: Programming for Linguists Lecture 10 September 30 th.
Copyright © 2006, Jumail, FSKSM, UTM Slide 1 Cascading Style Sheets (CSS)
CSS Layout Cascading Style Sheets. Lesson Overview  In this lesson, you will learn:  CSS Box Model  CSS properties for border  CSS properties for.
11/12/2015 Box Model Reed Crouch. 11/12/2015  HTML elements can be considered as boxes. In CSS, the term "box model" is used when referring to layout.
5 th ed: Chapter 4 4 th ed: Chapter 5 SY306 Web and Databases for Cyber Operations SlideSet #5: Advanced CSS.
CSS - Quiz #3 Lecture Code:
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring 2016 CSS Positioning 1.
Coding with HTML {. THE BASICS { What is HTML and how can you use it to make websites?
HTML and Dreamweaver November 11th. Agenda Box Model Displaying and positioning elements – Padding – Margin – Float – Display – Position HTML Demo.
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.
CIS 228 The Internet 10/18/11 Grouping XHTML. CSS Selectors Rule: selector-group { property-declaration* } Selector-group: selector *, Selector: simple-selector.
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 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.
CS 120: Introduction to Web Programming Lecture 10: Extra Features and Website Design Part 1 Tarik Booker CS 120 California State University, Los Angeles.
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.
CSS Layouts: Grouping Elements
Webpage layout using CSS
>> The “Box” Model
CSS Applications to XML 19-Sep-18.
Cascading Style Sheets
Table CSS Create a new CSS called tablestyle.CSS Green Background
Styles and the Box Model
CSS Borders and Margins.
Second CSS Lecture Applications to XML
MORE Cascading Style Sheets (The Positioning Model)
More CSS 22-Feb-19.
CSS Applications to XML 20-May-19.
CSS Applications to XML 3-Jul-19.
Positioning Boxes Using CSS
CGS 3066: Web Programming and Design Fall 2019 CSS Part 2
Presentation transcript:

Extra-simplified

 Only truly happen when the CSS and HTML are defined as separate files (external style sheet) Introduction The main idea of CSS is to….title { color: blue; font-weight: bold; }.content { color: #aa0000; } intro_css.html stylemain.css Introduction The main idea behind XML is to… intro_xml.html

 Example when the spirit of separation of content & presentation is not applied Introduction The main idea of CSS is to… intro_css.html Introduction The main idea behind XML is to… intro_xml.html

 CSS box model is used to represents and wraps the surrounding area of particular HTML element Content margin border padding height width background-color color

 The width and height box properties are applied to the content area; possible values are integers with the units of px, pt, cm, etc.  The background-color property is applied to both the content and padding areas; red, green, blue, #ff00ff, etc.  The color property is applied to the content and also to the border if the border-color property is not defined

 The margin, border, and padding box properties have their own individual sub-properties ( top, bottom, left, and right )  Below is padding box property with its top, bottom, left, and right sub-properties Hello World padding-top padding-bottom padding-left padding-right

 The margin and padding box properties can have their values be assigned by using mixed-shorthand or separated-individual setting approaches  Mixed-shorthand value settings : property_name: top right bottom left; property_name: top right_left bottom; property_name: top_bottom right_left; property_name: top_right_bottom_left; *** Do aware with the clockwise pattern

 Separated-individual value settings : property_name-top: top; property_name-bottom: bottom; property_name-left: left; property_name-right: right;  The values for margin and padding properties are normally integers with the units of px, pt, cm, etc.

 The border box property can also have its styles be assigned by using shorthand or separated-individual setting approaches  All in one mixed-shorthand value setting: border: width style color;  Mixed-shorthand value settings : border-subtype: top right bottom left; border-subtype: top right_left bottom; border-subtype: top_bottom right_left; border-subtype: top_right_bottom_left;

 All in one separated-individual value setting: border-top: width style color; border-bottom: width style color; border-left: width style color; border-right: width style color;  Separated-individual value settings : border-top-subtype: top; border-bottom-subtype: bottom; border-left-subtype: left; border-right-subtype: right;

 The subtype can be style, width, or color with the possible values are as follows: subtypeValues style solid, dashed, dotted, double width integers with the unit of px, pt, cm, %, etc. color red, green, blue, #ff00ff, etc.  The border-width and border-color properties are only applicable in CSS box model implementations when the border-style property is defined

 The outline property can be used to filled up the blank margin area  All in one mixed-shorthand setting: outline: color style width;  Separated individual value setting: outline-color: color; outline-style: style; outline-width: width;

 Almost all HTML element tags are applying CSS box model  Block element tags: … …, …, … … …, … …  Inline element tags: … … … …

 Example to start experimenting CSS box model b, a, span { border:1px solid red; } div, p, h1, td, li { border:1px solid red; } Bold text Link text Text inside span Text inside P Text inside H1 tag Apple Grape Orange A B C D Text inside DIV

 Exercise

 There are four positioning types in CSS  Static: the default element flow arranged by the browser  Fixed: fixed and relative to browser window  Relative: relative to the normal/default position  Absolute : relative to the first parent element

{ position: relative; top: 100px; left: 50px; } {position: fixed; top: 50px; right: 50px;} { position: absolute; top: 20px; left: 200px; }