SlideShare a Scribd company logo
Cascading Style Sheets (CSS) – Part I Svetlin Nakov Telerik Mobile Development Course mobiledevcourse.telerik.com Technical Trainer http:// www.nakov.com
Table of Contents (Part I) What is CSS? Styling with Cascading Stylesheets (CSS) Selectors and style definitions Linking HTML and CSS Fonts, Backgrounds, Borders
CSS: A New Philosophy Separate content from presentation! Title Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse at pede ut purus malesuada dictum. Donec vitae neque non magna aliquam dictum. Vestibulum et odio et ipsum accumsan accumsan. Morbi at arcu vel elit ultricies porta. Proin tortor purus, luctus non, aliquam nec, interdum vel, mi. Sed nec quam nec odio lacinia molestie. Praesent augue tortor, convallis eget, euismod nonummy, lacinia ut, risus.  Bold Italics Indent Content  (HTML document) Presentation (CSS Document)
The Resulting Page Title Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse at pede ut purus malesuada dictum. Donec vitae neque non magna aliquam dictum. Vestibulum et odio et ipsum accumsan accumsan. Morbi at arcu vel elit ultricies porta. Proin Tortor purus, luctus non, aliquam nec, interdum vel, mi. Sed nec quam nec odio lacinia molestie. Praesent augue tortor, convallis eget, euismod nonummy, lacinia ut, risus.
CSS Intro Styling with Cascading Stylesheets
CSS Introduction Cascading Style Sheets (CSS) Used to describe the presentation of documents Define sizes, spacing, fonts, colors, layout, etc. Improve content accessibility Improve flexibility Designed to separate presentation from content Due to CSS, all HTML presentation tags and attributes are deprecated, e.g.  font ,  center , etc.
CSS Introduction (2) CSS can be applied to any XML document Not just to HTML / XHTML CSS can specify different styles for different media On-screen In print Handheld, projection, etc. …  even by voice or Braille-based reader
Why “Cascading”? Priority scheme determining which style rules apply to element Cascade priorities  or  specificity (weight)  are calculated and assigned to the rules Child elements in the HTML DOM tree inherit styles from their parent Can override them Control via  !important  rule
Why “Cascading”? (2)
Why “Cascading”? (3) Some CSS styles are inherited and some not Text-related and list-related properties are inherited -  color ,  font-size ,  font-family ,  line-height ,  text-align ,  list-style , etc Box-related and positioning styles are not inherited -  width ,  height ,  border ,  margin ,  padding ,  position ,  float , etc <a>  elements do not inherit color and text-decoration
Style Sheets Syntax Stylesheets consist of rules, selectors, declarations, properties and values Selectors are separated by commas Declarations are separated by semicolons Properties and values are separated by colons h1,h2,h3 { color: green; font-weight: bold; } http://css.maxdesign.com.au/
Selectors Selectors determine which element the rule applies to:  All elements of specific type (tag) Those that mach a specific attribute (id, class) Elements may be matched depending on how they are nested in the document tree (HTML) Examples: .header a { color: green } #menu>li { padding-top: 8px }
Selectors (2) Three primary kinds of selectors: By tag (type selector): By element id: By element class name (only for HTML):  Selectors can be combined with commas: This will match  <h1>  tags, elements with class  link , and element with id  top-link h1 { font-family: verdana,sans-serif; } #element_id { color: #ff0000; } .myClass {border: 1px solid red} h1, .link, #top-link {font-weight: bold}
Selectors (3) Pseudo-classes define state :hover ,  :visited ,  :active  ,  :lang Pseudo-elements define element &quot;parts&quot; or are used to generate content :first-line  ,  :before ,  :after a:hover { color: red; } p:first-line { text-transform: uppercase; } .title:before { content: &quot;»&quot;; } .title:after { content: &quot;«&quot;; }
Selectors (4) Match relative to element placement: This will match all  <a>  tags that are inside of  <p> *  – universal selector (avoid or use with care!): This will match all descendants of  <p>  element +  selector – used to match “next sibling”: This will match all siblings with class name  link  that appear immediately after  < img >  tag p a {text-decoration: underline} p * {color: black} img + .link {float:right}
Selectors (5) >  selector – matches direct child nodes: This will match all elements with class  error , direct children of  <p>  tag [   ]  – matches tag attributes by regular expression: This will match all  <img>  tags with  alt  attribute containing the word  logo .class1.class2  (no space) - matches elements with both (all) classes applied at the same time p > .error {font-size: 8px} img[alt~=logo] {border: none}
Values in the CSS Rules Colors are set in RGB format (decimal or hex):  Example:  #a0a6aa = rgb(160, 166, 170) Predefined color aliases exist:  black ,  blue , etc. Numeric values are specified in: Pixels, ems, e.g.  12px  ,  1.4em Points, inches, centimeters, millimeters E.g.  10pt  ,  1in ,  1cm ,  1mm Percentages, e.g.  50% Percentage of what?... Zero can be used with no unit:  border: 0;
Default Browser Styles Browsers have default CSS styles Used when there is no CSS information or any other style information in the document Caution: default styles differ in browsers E.g. margins, paddings and font sizes differ most often and usually developers reset them * { margin: 0; padding: 0; } body, h1, p, ul, li { margin: 0; padding: 0; }
Linking HTML and CSS HTML (content) and CSS (presentation) can be linked in three ways: Inline : the CSS rules in the  style  attribute No selectors are needed Embedded : in the <head> in a  <style>  tag External : CSS rules in separate file (best) Usually a file with  .css  extension Linked via  <link   rel=&quot;stylesheet&quot;   href=…>   tag or  @import  directive in embedded CSS block
Linking HTML and CSS (2) Using external files is highly recommended Simplifies the HTML document  Improves page load speed as the CSS file is cached
Inline Styles: Example <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/ DTD/xhtml1-transitional.dtd&quot;> <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;> <head> <title>Inline Styles</title> </head> <body> <p>Here is some text</p> <!--Separate multiple styles with a semicolon--> <p style=&quot;font-size: 20pt&quot;>Here is some more text</p> <p style=&quot;font-size: 20pt;color: #0000FF&quot; >Even more text</p>  </body> </html> inline-styles.html
Inline Styles: Example <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/ DTD/xhtml1-transitional.dtd&quot;> <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;> <head> <title>Inline Styles</title> </head> <body> <p>Here is some text</p> <!--Separate multiple styles with a semicolon--> <p style=&quot;font-size: 20pt&quot;>Here is some more text</p> <p style=&quot;font-size: 20pt;color: #0000FF&quot; >Even more text</p>  </body> </html> inline-styles.html
CSS Cascade (Precedence) There are browser, user and author stylesheets with &quot;normal&quot; and &quot;important&quot; declarations Browser styles (least priority) Normal user styles Normal author styles (external, in head, inline) Important author styles Important user styles (max priority) a { color: red !important ; } http://www.slideshare.net/maxdesign/css-cascade-1658158
CSS Specificity CSS specificity is used to determine the precedence of CSS style declarations with the same origin. Selectors are what matters Simple calculation: #id = 100, .class = 10, :pseudo = 10, [attr] = 10, tag = 1, * = 0 Same number of points? Order matters. See also: http://www.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/   http://css.maxdesign.com.au/selectutorial/advanced_conflict.htm
CSS Rules Precedence  Live Demo precedence.html
Embedded Styles Embedded in the HTML in the  <style>  tag: The  <style>  tag is placed in the  <head>  section of the document type  attribute specifies the MIME type MIME describes the format of the content Other MIME types include  text/html ,  image/gif ,  text/javascript  … Used for document-specific styles <style type=&quot;text/css&quot;>
Embedded Styles: Example <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;> <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;> <head> <title>Style Sheets</title> <style type=&quot;text/css&quot;> em {background-color:#8000FF; color:white} h1 {font-family:Arial, sans-serif} p  {font-size:18pt} .blue {color:blue} </style> <head> embedded-stylesheets.html
Embedded Styles: Example (2) … <body> <h1 class=&quot;blue&quot;>A Heading</h1> <p>Here is some text. Here is some text. Here is some text. Here is some text. Here is some text.</p>  <h1>Another Heading</h1>  <p class=&quot;blue&quot;>Here is some more text. Here is some more text.</p> <p class=&quot;blue&quot;>Here is some <em>more</em> text. Here is some more text.</p>  </body> </html>
Embedded Styles: Example (3) … <body> <h1 class=&quot;blue&quot;>A Heading</h1> <p>Here is some text. Here is some text. Here is some text. Here is some text. Here is some text.</p>  <h1>Another Heading</h1>  <p class=&quot;blue&quot;>Here is some more text. Here is some more text.</p> <p class=&quot;blue&quot;>Here is some <em>more</em> text. Here is some more text.</p>  </body> </html>
External CSS Styles External linking Separate pages can all use a shared style sheet Only modify a single file to change the styles across your entire Web site  (see  http://www.csszengarden.com/ ) link  tag (with a  rel  attribute) Specifies a relationship between current document and another document link  elements should be in the  <head> <link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;styles.css&quot;>
External CSS Styles (2) @import Another way to link external CSS files Example: Ancient browsers do not recognize @import Use @import in an external CSS file to workaround the IE 32 CSS file limit <style type=&quot;text/css&quot;> @import url(&quot;styles.css&quot;);   /* same as */ @import &quot;styles.css&quot;; </style>
External Styles: Example /* CSS Document */ a    { text-decoration: none } a:hover { text-decoration: underline; color: red; background-color: #CCFFCC } li em  { color: red;  font-weight: bold } ul   { margin-left: 2cm } ul ul   { text-decoration: underline;  margin-left: .5cm } styles.css
External Styles: Example (2) <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0  Transitional//EN&quot;  &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;> <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;> <head> <title>Importing style sheets</title> <link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;styles.css&quot;  /> </head> <body> <h1>Shopping list for <em>Monday</em>:</h1> <li>Milk</li> … external-styles.html
External Styles: Example (3) … <li>Bread <ul> <li>White bread</li> <li>Rye bread</li> <li>Whole wheat bread</li> </ul> </li> <li>Rice</li> <li>Potatoes</li> <li>Pizza <em>with mushrooms</em></li> </ul> <a href=&quot;http://food.com&quot; title=&quot;grocery store&quot;>Go to the Grocery store</a> </body> </html>
External Styles: Example (4) … <li>Bread <ul> <li>White bread</li> <li>Rye bread</li> <li>Whole wheat bread</li> </ul> </li> <li>Rice</li> <li>Potatoes</li> <li>Pizza <em>with mushrooms</em></li> </ul> <a href=&quot;http://food.com&quot; title=&quot;grocery store&quot;>Go to the Grocery store</a> </body> </html>
Text-related CSS Properties color  – specifies the color of the text font-size  – size of font:  xx-small ,  x-small ,  small ,  medium ,  large ,  x-large ,  xx-large ,  smaller ,  larger  or numeric value font-family  – comma separated font names Example:  verdana ,  sans-serif , etc.  The browser loads the first one that is available There should always be at least one generic font font-weight  can be  normal ,  bold ,  bolder ,  lighter  or a number in range [ 100   …   900 ]
CSS Rules for Fonts (2) font-style  – styles the font Values:  normal ,  italic ,  oblique text-decoration  – decorates the text Values:  none ,  underline ,  line-trough ,  overline ,  blink text-align  – defines the alignment of text or other content Values:  left ,  right ,  center ,  justify
Shorthand Font Property font Shorthand rule for setting multiple font properties at the same time is equal to writing this: font:italic normal bold 12px/16px verdana font-style: italic; font-variant: normal; font-weight: bold; font-size: 12px; line-height: 16px; font-family: verdana;
Fonts Live Demo font-rules.html
Backgrounds background-image URL of image to be used as background, e.g.: background-color Using color and image and the same time background-repeat repeat-x ,  repeat-y ,  repeat ,  no-repeat background-attachment fixed  /  scroll background-image:url(&quot;back.gif&quot;);
Backgrounds (2) background-position : specifies vertical and horizontal position of the background image Vertical position:  top ,  center ,  bottom Horizontal position:  left ,  center ,  right Both can be specified in percentage or other numerical values Examples: background-position: top left; background-position: -5px 50%;
Background Shorthand Property background : shorthand rule for setting background properties at the same time: is equal to writing: Some browsers will not apply BOTH color and image for background if using shorthand rule background: #FFF0C0 url(&quot;back.gif&quot;) no-repeat fixed top; background-color: #FFF0C0; background-image: url(&quot;back.gif&quot;); background-repeat: no-repeat; background-attachment: fixed; background-position: top;
Background-image or  <img> ? Background images allow you to save many image tags from the HTML  Leads to less code More content-oriented approach All images that are not part of the page content (and are used only for &quot;beautification&quot;) should be moved to the CSS
Background Styles Live Demo background-rules.html
Borders border-width :  thin ,  medium ,  thick  or numerical value (e.g.  10px ) border-color : color alias or RGB value border-style :  none ,  hidden ,  dotted ,  dashed ,  solid ,  double ,  groove ,  ridge ,  inset ,  outset Each property can be defined separately for left, top, bottom and right border-top-style ,  border-left-color , …
Border Shorthand Property border : shorthand rule for setting border properties at once: is equal to writing: Specify different borders for the sides via shorthand rules:  border-top ,  border-left ,  border-right ,  border-bottom When to avoid  border:0 border: 1px solid red border-width:1px; border-color:red; border-style:solid;
Borders Live Demo border-rules.html
CSS Reference A list of all CSS 2.1 properties is available at  http://www.w3.org/TR/CSS2/propidx.html
CSS – Part I Questions? http://frontendcourse.telerik.com
Exercises Create the following page section using HTML and external CSS (no inline styles). Use a table or a definition list (in this case the layout will be different).
Exercises (2) Create the following Web page using external CSS styles. The country flags should be PNG images with text over them.
Exercises (3) Create the following Web page region using HTML with external CSS file. Note that each of the sections should be a hyperlink. Hints: use  display:inline-block   style for the list items and paddings where needed.

More Related Content

What's hot (20)

CSS - Text Properties
CSS - Text PropertiesCSS - Text Properties
CSS - Text Properties
hstryk
 
Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02
Hatem Mahmoud
 
CSS
CSSCSS
CSS
Raja Kumar Ranjan
 
Responsive web design with html5 and css3
Responsive web design with html5 and css3Responsive web design with html5 and css3
Responsive web design with html5 and css3
Divya Tiwari
 
Cascading style sheets - CSS
Cascading style sheets - CSSCascading style sheets - CSS
Cascading style sheets - CSS
iFour Institute - Sustainable Learning
 
Css Complete Notes
Css Complete NotesCss Complete Notes
Css Complete Notes
EPAM Systems
 
Css
CssCss
Css
shanmuga rajan
 
Css.html
Css.htmlCss.html
Css.html
Anaghabalakrishnan
 
Web front end development introduction to html css and javascript
Web front end development introduction to html css and javascriptWeb front end development introduction to html css and javascript
Web front end development introduction to html css and javascript
Marc Huang
 
HTML CSS Basics
HTML CSS BasicsHTML CSS Basics
HTML CSS Basics
Mai Moustafa
 
CSS 101
CSS 101CSS 101
CSS 101
dunclair
 
FFW Gabrovo PMG - CSS
FFW Gabrovo PMG - CSSFFW Gabrovo PMG - CSS
FFW Gabrovo PMG - CSS
Toni Kolev
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
Larry King
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
Salman Memon
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
Ferdous Mahmud Shaon
 
Cascading Style Sheets(CSS)
Cascading Style Sheets(CSS)Cascading Style Sheets(CSS)
Cascading Style Sheets(CSS)
Reshmi Rajan
 
Introducing Cascading Style Sheets
Introducing Cascading Style SheetsIntroducing Cascading Style Sheets
Introducing Cascading Style Sheets
St. Petersburg College
 
Css ppt
Css pptCss ppt
Css ppt
Nidhi mishra
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheet
Michael Jhon
 

Similar to CSS Part I (20)

CSS.pptx
CSS.pptxCSS.pptx
CSS.pptx
VijayKumarLokanadam
 
CSS Overview
CSS OverviewCSS Overview
CSS Overview
Doncho Minkov
 
CSS
CSSCSS
CSS
BG Java EE Course
 
Week3 css
Week3 cssWeek3 css
Week3 css
Rowena LI
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
Marc Steel
 
Cascstylesheets
CascstylesheetsCascstylesheets
Cascstylesheets
Digital Insights - Digital Marketing Agency
 
PHP HTML CSS Notes
PHP HTML CSS  NotesPHP HTML CSS  Notes
PHP HTML CSS Notes
Tushar Rajput
 
Chapter 4a cascade style sheet css
Chapter 4a cascade style sheet cssChapter 4a cascade style sheet css
Chapter 4a cascade style sheet css
Tesfaye Yenealem
 
Css introduction
Css introductionCss introduction
Css introduction
Sridhar P
 
Web technology Unit-II Part-C
Web technology Unit-II Part-CWeb technology Unit-II Part-C
Web technology Unit-II Part-C
SSN College of Engineering, Kalavakkam
 
(Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS (Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS
Dave Kelly
 
Css basics
Css basicsCss basics
Css basics
mirza asif haider
 
Css training tutorial css3 &amp; css4 essentials
Css training tutorial css3 &amp; css4 essentialsCss training tutorial css3 &amp; css4 essentials
Css training tutorial css3 &amp; css4 essentials
QA TrainingHub
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Erin M. Kidwell
 
Css
CssCss
Css
MAGNA COLLEGE OF ENGINEERING
 
Lecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptxLecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptx
GmachImen
 
CSS
CSSCSS
CSS
venkatachalam84
 
Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01
Hatem Mahmoud
 
Unit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.pptUnit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.ppt
TusharTikia
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
Joseph Gabriel
 

More from Doncho Minkov (20)

Web design Tools
Web design ToolsWeb design Tools
Web design Tools
Doncho Minkov
 
HTML 5
HTML 5HTML 5
HTML 5
Doncho Minkov
 
HTML 5 Tables and Forms
HTML 5 Tables and FormsHTML 5 Tables and Forms
HTML 5 Tables and Forms
Doncho Minkov
 
CSS Presentation
CSS PresentationCSS Presentation
CSS Presentation
Doncho Minkov
 
CSS Layout
CSS LayoutCSS Layout
CSS Layout
Doncho Minkov
 
CSS 3
CSS 3CSS 3
CSS 3
Doncho Minkov
 
Adobe Photoshop
Adobe PhotoshopAdobe Photoshop
Adobe Photoshop
Doncho Minkov
 
Slice and Dice
Slice and DiceSlice and Dice
Slice and Dice
Doncho Minkov
 
Introduction to XAML and WPF
Introduction to XAML and WPFIntroduction to XAML and WPF
Introduction to XAML and WPF
Doncho Minkov
 
WPF Layout Containers
WPF Layout ContainersWPF Layout Containers
WPF Layout Containers
Doncho Minkov
 
WPF Controls
WPF ControlsWPF Controls
WPF Controls
Doncho Minkov
 
WPF Templating and Styling
WPF Templating and StylingWPF Templating and Styling
WPF Templating and Styling
Doncho Minkov
 
WPF Graphics and Animations
WPF Graphics and AnimationsWPF Graphics and Animations
WPF Graphics and Animations
Doncho Minkov
 
Simple Data Binding
Simple Data BindingSimple Data Binding
Simple Data Binding
Doncho Minkov
 
Complex Data Binding
Complex Data BindingComplex Data Binding
Complex Data Binding
Doncho Minkov
 
WPF Concepts
WPF ConceptsWPF Concepts
WPF Concepts
Doncho Minkov
 
Model View ViewModel
Model View ViewModelModel View ViewModel
Model View ViewModel
Doncho Minkov
 
WPF and Databases
WPF and DatabasesWPF and Databases
WPF and Databases
Doncho Minkov
 
Introduction to Cross-platform Mobile Development Course
Introduction to Cross-platform Mobile Development CourseIntroduction to Cross-platform Mobile Development Course
Introduction to Cross-platform Mobile Development Course
Doncho Minkov
 

Recently uploaded (20)

TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Rock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning JourneyRock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning Journey
Lynda Kane
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical DebtBuckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Lynda Kane
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Kualitatem’s Cybersecurity Risk Assessment
Kualitatem’s Cybersecurity Risk AssessmentKualitatem’s Cybersecurity Risk Assessment
Kualitatem’s Cybersecurity Risk Assessment
Kualitatem Inc
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko
Fwdays
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Building Resilience with Energy Management for the Public Sector
Building Resilience with Energy Management for the Public SectorBuilding Resilience with Energy Management for the Public Sector
Building Resilience with Energy Management for the Public Sector
Splunk
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Rock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning JourneyRock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning Journey
Lynda Kane
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical DebtBuckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Lynda Kane
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Kualitatem’s Cybersecurity Risk Assessment
Kualitatem’s Cybersecurity Risk AssessmentKualitatem’s Cybersecurity Risk Assessment
Kualitatem’s Cybersecurity Risk Assessment
Kualitatem Inc
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko
Fwdays
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Building Resilience with Energy Management for the Public Sector
Building Resilience with Energy Management for the Public SectorBuilding Resilience with Energy Management for the Public Sector
Building Resilience with Energy Management for the Public Sector
Splunk
 

CSS Part I

  • 1. Cascading Style Sheets (CSS) – Part I Svetlin Nakov Telerik Mobile Development Course mobiledevcourse.telerik.com Technical Trainer http:// www.nakov.com
  • 2. Table of Contents (Part I) What is CSS? Styling with Cascading Stylesheets (CSS) Selectors and style definitions Linking HTML and CSS Fonts, Backgrounds, Borders
  • 3. CSS: A New Philosophy Separate content from presentation! Title Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse at pede ut purus malesuada dictum. Donec vitae neque non magna aliquam dictum. Vestibulum et odio et ipsum accumsan accumsan. Morbi at arcu vel elit ultricies porta. Proin tortor purus, luctus non, aliquam nec, interdum vel, mi. Sed nec quam nec odio lacinia molestie. Praesent augue tortor, convallis eget, euismod nonummy, lacinia ut, risus. Bold Italics Indent Content (HTML document) Presentation (CSS Document)
  • 4. The Resulting Page Title Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse at pede ut purus malesuada dictum. Donec vitae neque non magna aliquam dictum. Vestibulum et odio et ipsum accumsan accumsan. Morbi at arcu vel elit ultricies porta. Proin Tortor purus, luctus non, aliquam nec, interdum vel, mi. Sed nec quam nec odio lacinia molestie. Praesent augue tortor, convallis eget, euismod nonummy, lacinia ut, risus.
  • 5. CSS Intro Styling with Cascading Stylesheets
  • 6. CSS Introduction Cascading Style Sheets (CSS) Used to describe the presentation of documents Define sizes, spacing, fonts, colors, layout, etc. Improve content accessibility Improve flexibility Designed to separate presentation from content Due to CSS, all HTML presentation tags and attributes are deprecated, e.g. font , center , etc.
  • 7. CSS Introduction (2) CSS can be applied to any XML document Not just to HTML / XHTML CSS can specify different styles for different media On-screen In print Handheld, projection, etc. … even by voice or Braille-based reader
  • 8. Why “Cascading”? Priority scheme determining which style rules apply to element Cascade priorities or specificity (weight) are calculated and assigned to the rules Child elements in the HTML DOM tree inherit styles from their parent Can override them Control via !important rule
  • 10. Why “Cascading”? (3) Some CSS styles are inherited and some not Text-related and list-related properties are inherited - color , font-size , font-family , line-height , text-align , list-style , etc Box-related and positioning styles are not inherited - width , height , border , margin , padding , position , float , etc <a> elements do not inherit color and text-decoration
  • 11. Style Sheets Syntax Stylesheets consist of rules, selectors, declarations, properties and values Selectors are separated by commas Declarations are separated by semicolons Properties and values are separated by colons h1,h2,h3 { color: green; font-weight: bold; } http://css.maxdesign.com.au/
  • 12. Selectors Selectors determine which element the rule applies to: All elements of specific type (tag) Those that mach a specific attribute (id, class) Elements may be matched depending on how they are nested in the document tree (HTML) Examples: .header a { color: green } #menu>li { padding-top: 8px }
  • 13. Selectors (2) Three primary kinds of selectors: By tag (type selector): By element id: By element class name (only for HTML): Selectors can be combined with commas: This will match <h1> tags, elements with class link , and element with id top-link h1 { font-family: verdana,sans-serif; } #element_id { color: #ff0000; } .myClass {border: 1px solid red} h1, .link, #top-link {font-weight: bold}
  • 14. Selectors (3) Pseudo-classes define state :hover , :visited , :active , :lang Pseudo-elements define element &quot;parts&quot; or are used to generate content :first-line , :before , :after a:hover { color: red; } p:first-line { text-transform: uppercase; } .title:before { content: &quot;»&quot;; } .title:after { content: &quot;«&quot;; }
  • 15. Selectors (4) Match relative to element placement: This will match all <a> tags that are inside of <p> * – universal selector (avoid or use with care!): This will match all descendants of <p> element + selector – used to match “next sibling”: This will match all siblings with class name link that appear immediately after < img > tag p a {text-decoration: underline} p * {color: black} img + .link {float:right}
  • 16. Selectors (5) > selector – matches direct child nodes: This will match all elements with class error , direct children of <p> tag [ ] – matches tag attributes by regular expression: This will match all <img> tags with alt attribute containing the word logo .class1.class2 (no space) - matches elements with both (all) classes applied at the same time p > .error {font-size: 8px} img[alt~=logo] {border: none}
  • 17. Values in the CSS Rules Colors are set in RGB format (decimal or hex): Example: #a0a6aa = rgb(160, 166, 170) Predefined color aliases exist: black , blue , etc. Numeric values are specified in: Pixels, ems, e.g. 12px , 1.4em Points, inches, centimeters, millimeters E.g. 10pt , 1in , 1cm , 1mm Percentages, e.g. 50% Percentage of what?... Zero can be used with no unit: border: 0;
  • 18. Default Browser Styles Browsers have default CSS styles Used when there is no CSS information or any other style information in the document Caution: default styles differ in browsers E.g. margins, paddings and font sizes differ most often and usually developers reset them * { margin: 0; padding: 0; } body, h1, p, ul, li { margin: 0; padding: 0; }
  • 19. Linking HTML and CSS HTML (content) and CSS (presentation) can be linked in three ways: Inline : the CSS rules in the style attribute No selectors are needed Embedded : in the <head> in a <style> tag External : CSS rules in separate file (best) Usually a file with .css extension Linked via <link rel=&quot;stylesheet&quot; href=…> tag or @import directive in embedded CSS block
  • 20. Linking HTML and CSS (2) Using external files is highly recommended Simplifies the HTML document Improves page load speed as the CSS file is cached
  • 21. Inline Styles: Example <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/ DTD/xhtml1-transitional.dtd&quot;> <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;> <head> <title>Inline Styles</title> </head> <body> <p>Here is some text</p> <!--Separate multiple styles with a semicolon--> <p style=&quot;font-size: 20pt&quot;>Here is some more text</p> <p style=&quot;font-size: 20pt;color: #0000FF&quot; >Even more text</p> </body> </html> inline-styles.html
  • 22. Inline Styles: Example <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/ DTD/xhtml1-transitional.dtd&quot;> <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;> <head> <title>Inline Styles</title> </head> <body> <p>Here is some text</p> <!--Separate multiple styles with a semicolon--> <p style=&quot;font-size: 20pt&quot;>Here is some more text</p> <p style=&quot;font-size: 20pt;color: #0000FF&quot; >Even more text</p> </body> </html> inline-styles.html
  • 23. CSS Cascade (Precedence) There are browser, user and author stylesheets with &quot;normal&quot; and &quot;important&quot; declarations Browser styles (least priority) Normal user styles Normal author styles (external, in head, inline) Important author styles Important user styles (max priority) a { color: red !important ; } http://www.slideshare.net/maxdesign/css-cascade-1658158
  • 24. CSS Specificity CSS specificity is used to determine the precedence of CSS style declarations with the same origin. Selectors are what matters Simple calculation: #id = 100, .class = 10, :pseudo = 10, [attr] = 10, tag = 1, * = 0 Same number of points? Order matters. See also: http://www.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/ http://css.maxdesign.com.au/selectutorial/advanced_conflict.htm
  • 25. CSS Rules Precedence Live Demo precedence.html
  • 26. Embedded Styles Embedded in the HTML in the <style> tag: The <style> tag is placed in the <head> section of the document type attribute specifies the MIME type MIME describes the format of the content Other MIME types include text/html , image/gif , text/javascript … Used for document-specific styles <style type=&quot;text/css&quot;>
  • 27. Embedded Styles: Example <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;> <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;> <head> <title>Style Sheets</title> <style type=&quot;text/css&quot;> em {background-color:#8000FF; color:white} h1 {font-family:Arial, sans-serif} p {font-size:18pt} .blue {color:blue} </style> <head> embedded-stylesheets.html
  • 28. Embedded Styles: Example (2) … <body> <h1 class=&quot;blue&quot;>A Heading</h1> <p>Here is some text. Here is some text. Here is some text. Here is some text. Here is some text.</p> <h1>Another Heading</h1> <p class=&quot;blue&quot;>Here is some more text. Here is some more text.</p> <p class=&quot;blue&quot;>Here is some <em>more</em> text. Here is some more text.</p> </body> </html>
  • 29. Embedded Styles: Example (3) … <body> <h1 class=&quot;blue&quot;>A Heading</h1> <p>Here is some text. Here is some text. Here is some text. Here is some text. Here is some text.</p> <h1>Another Heading</h1> <p class=&quot;blue&quot;>Here is some more text. Here is some more text.</p> <p class=&quot;blue&quot;>Here is some <em>more</em> text. Here is some more text.</p> </body> </html>
  • 30. External CSS Styles External linking Separate pages can all use a shared style sheet Only modify a single file to change the styles across your entire Web site (see http://www.csszengarden.com/ ) link tag (with a rel attribute) Specifies a relationship between current document and another document link elements should be in the <head> <link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;styles.css&quot;>
  • 31. External CSS Styles (2) @import Another way to link external CSS files Example: Ancient browsers do not recognize @import Use @import in an external CSS file to workaround the IE 32 CSS file limit <style type=&quot;text/css&quot;> @import url(&quot;styles.css&quot;); /* same as */ @import &quot;styles.css&quot;; </style>
  • 32. External Styles: Example /* CSS Document */ a { text-decoration: none } a:hover { text-decoration: underline; color: red; background-color: #CCFFCC } li em { color: red; font-weight: bold } ul { margin-left: 2cm } ul ul { text-decoration: underline; margin-left: .5cm } styles.css
  • 33. External Styles: Example (2) <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;> <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;> <head> <title>Importing style sheets</title> <link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;styles.css&quot; /> </head> <body> <h1>Shopping list for <em>Monday</em>:</h1> <li>Milk</li> … external-styles.html
  • 34. External Styles: Example (3) … <li>Bread <ul> <li>White bread</li> <li>Rye bread</li> <li>Whole wheat bread</li> </ul> </li> <li>Rice</li> <li>Potatoes</li> <li>Pizza <em>with mushrooms</em></li> </ul> <a href=&quot;http://food.com&quot; title=&quot;grocery store&quot;>Go to the Grocery store</a> </body> </html>
  • 35. External Styles: Example (4) … <li>Bread <ul> <li>White bread</li> <li>Rye bread</li> <li>Whole wheat bread</li> </ul> </li> <li>Rice</li> <li>Potatoes</li> <li>Pizza <em>with mushrooms</em></li> </ul> <a href=&quot;http://food.com&quot; title=&quot;grocery store&quot;>Go to the Grocery store</a> </body> </html>
  • 36. Text-related CSS Properties color – specifies the color of the text font-size – size of font: xx-small , x-small , small , medium , large , x-large , xx-large , smaller , larger or numeric value font-family – comma separated font names Example: verdana , sans-serif , etc. The browser loads the first one that is available There should always be at least one generic font font-weight can be normal , bold , bolder , lighter or a number in range [ 100 … 900 ]
  • 37. CSS Rules for Fonts (2) font-style – styles the font Values: normal , italic , oblique text-decoration – decorates the text Values: none , underline , line-trough , overline , blink text-align – defines the alignment of text or other content Values: left , right , center , justify
  • 38. Shorthand Font Property font Shorthand rule for setting multiple font properties at the same time is equal to writing this: font:italic normal bold 12px/16px verdana font-style: italic; font-variant: normal; font-weight: bold; font-size: 12px; line-height: 16px; font-family: verdana;
  • 39. Fonts Live Demo font-rules.html
  • 40. Backgrounds background-image URL of image to be used as background, e.g.: background-color Using color and image and the same time background-repeat repeat-x , repeat-y , repeat , no-repeat background-attachment fixed / scroll background-image:url(&quot;back.gif&quot;);
  • 41. Backgrounds (2) background-position : specifies vertical and horizontal position of the background image Vertical position: top , center , bottom Horizontal position: left , center , right Both can be specified in percentage or other numerical values Examples: background-position: top left; background-position: -5px 50%;
  • 42. Background Shorthand Property background : shorthand rule for setting background properties at the same time: is equal to writing: Some browsers will not apply BOTH color and image for background if using shorthand rule background: #FFF0C0 url(&quot;back.gif&quot;) no-repeat fixed top; background-color: #FFF0C0; background-image: url(&quot;back.gif&quot;); background-repeat: no-repeat; background-attachment: fixed; background-position: top;
  • 43. Background-image or <img> ? Background images allow you to save many image tags from the HTML Leads to less code More content-oriented approach All images that are not part of the page content (and are used only for &quot;beautification&quot;) should be moved to the CSS
  • 44. Background Styles Live Demo background-rules.html
  • 45. Borders border-width : thin , medium , thick or numerical value (e.g. 10px ) border-color : color alias or RGB value border-style : none , hidden , dotted , dashed , solid , double , groove , ridge , inset , outset Each property can be defined separately for left, top, bottom and right border-top-style , border-left-color , …
  • 46. Border Shorthand Property border : shorthand rule for setting border properties at once: is equal to writing: Specify different borders for the sides via shorthand rules: border-top , border-left , border-right , border-bottom When to avoid border:0 border: 1px solid red border-width:1px; border-color:red; border-style:solid;
  • 47. Borders Live Demo border-rules.html
  • 48. CSS Reference A list of all CSS 2.1 properties is available at http://www.w3.org/TR/CSS2/propidx.html
  • 49. CSS – Part I Questions? http://frontendcourse.telerik.com
  • 50. Exercises Create the following page section using HTML and external CSS (no inline styles). Use a table or a definition list (in this case the layout will be different).
  • 51. Exercises (2) Create the following Web page using external CSS styles. The country flags should be PNG images with text over them.
  • 52. Exercises (3) Create the following Web page region using HTML with external CSS file. Note that each of the sections should be a hyperlink. Hints: use display:inline-block style for the list items and paddings where needed.

Editor's Notes

  • #6: * 07/16/96 (c) 2007 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.* ##