SlideShare a Scribd company logo
Lecture 2: CSS I SFDV2001 Web Development
Cascading Style Sheets You have experienced the limitation of presentation control in transitional HTML. Now you can forget about deprecated tags and experience the highly advanced presentation control afforded by CSS. With CSS:  One file can completely control the appearance of ALL your HTML files. You have much, much greater control over appearance and behaviour of your page content. Web sites that use CSS are much easier to alter the appearance of.
Cascading Style Sheets Transitional code is, generally speaking, consistently presented by most browsers. Switching to CSS to control all your presentation means much more work to get satisfactory behavior across a range of browsers. The power of CSS means that it is a lot more complicated than transitional HTML. There are many, many new stylistic controls and a new way of thinking about elements on your page.  Your structural HTML skills need to be sound if you are to use your CSS sensibly. Writing sensible and efficient CSS code is harder than writing good HTML code.
A little background W3C completed the CSS1 specifications in 1996. IE 3, released the same year, had some CSS support. CSS2 was published in 1998. Not until 2000, when IE 5 for Mac, was released did any browser have "full" CSS1 support. No browser has full CSS2 support.  The latest versions of Safari and Opera pass the Acid2 test. Firefox and IE do not. IE currently fares worst. "I’ll go ahead and relieve the suspense by saying we will not pass this test when IE7 ships." -  Chris Wilson (IEBlog)
Getting started Step 1. doctype: <!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot;> When you use CSS your HTML should conform to the HTML 4.01 strict standard. Step 2. Get rid of all deprecated tags and attributes: font align bgcolor etc. Your HTML should only describe the structure of your content, it should ideally contain no formatting information.
Getting started Step 3. Add style information Internally: inline and embedded Externally: linked and imported 99% of the time linked is the best option. You may opt to have a few single-page specific styles embedded in an HTML document. Inline styles are really no better than  <font>  tags and there are very, very few good reasons for using them. Imported and embedded styles can be hidden from older browsers.
 
 
CSS Rules Cascading style sheets consist of a series of rules that determine how your HTML content will be displayed. Rules take the format: selector{ property: value; } For example: body{ background-color: #ffe89d; }
CSS Rules You add further property value pairs to an element's rule to more specifically control its appearance: body{ background-color: #ffe89d; color: #000e78; font-family: Arial, sans-serif; margin: 5%; } A style sheet consists of a series of such rules.
Cascading It's probably fairly obvious how the &quot;style sheet&quot; bit of CSS applies, but the &quot;cascading&quot; bit isn't so obvious. The cascade in CSS is how styles take precedence over other styles. Because you can have many style rules in play, to avoid conflict certain style information overrides other.
The cascade Least powerful:  Browser default settings User browser settings Linked styles * Imported styles* Embedded styles** Inline styles Author !important rules Most powerful: User !important rules * Later files take precedence over earlier ones. ** Later rules have greater weight.
The cascade You can alter the power hierarchy by using the  !important  indicator: selector{ property: value !important; } !important  beats even inline styles. Think carefully before wielding such power - you have to ensure that the style is sensible in all circumstances.
 
Ultimately the user wins Users can take away your power with one click.
Inheritance One of the things that makes CSS so efficient to use is the ability to have style rules inherited between parent and child elements. Parent Child <html> <body> <ol> <li> <ul> <li> <table> <tr> <tr> <td>
Inheritance
Inheritance Alter to suit
Inheritance Many CSS properties are automatically inherited from an element's parent.  You can explicitly set a property's value to inherit. Everything contained within you  <body>  tags is a child of the body. So, properties set for the body can be inherited by its children (like  <p>  or  <h1>  etc).
Recommended sites: CSS Zen garden: http://www.csszengarden.com/ A List Apart's CSS articles: http://www.alistapart.com/topics/code/css/ W3C's CSS Home Page: http://www.w3.org/Style/CSS/ Further reading: Cascading Style Sheets the Definitive Guide  by Eric A. Meyer CSS Cookbook  by Christopher Schmitt

More Related Content

What's hot (20)

Structuring your CSS for maintainability: rules and guile lines to write CSS
Structuring your CSS for maintainability: rules and guile lines to write CSSStructuring your CSS for maintainability: rules and guile lines to write CSS
Structuring your CSS for maintainability: rules and guile lines to write CSS
Sanjoy Kr. Paul
 
Organize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS TricksOrganize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS Tricks
Andolasoft Inc
 
6 Steps to Make Your CSS Code More Maintainable
6 Steps to Make Your CSS Code More Maintainable6 Steps to Make Your CSS Code More Maintainable
6 Steps to Make Your CSS Code More Maintainable
10Clouds
 
Web Development Workshop (Front End)
Web Development Workshop (Front End)Web Development Workshop (Front End)
Web Development Workshop (Front End)
DSCIIITLucknow
 
HTML and CSS
HTML and CSSHTML and CSS
HTML and CSS
Ketan Ghumatkar
 
Css intro
Css introCss intro
Css intro
Andz Bass
 
Css external style sheet
Css external style sheetCss external style sheet
Css external style sheet
Jesus Obenita Jr.
 
Css introduction
Css   introductionCss   introduction
Css introduction
AbhishekMondal42
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
ShreyaShetty92
 
Style Your Site Part 1
Style Your Site Part 1Style Your Site Part 1
Style Your Site Part 1
Ben MacNeill
 
Css inclusion
Css   inclusionCss   inclusion
Css inclusion
AbhishekMondal42
 
HTML CSS and Web Development
HTML CSS and Web DevelopmentHTML CSS and Web Development
HTML CSS and Web Development
Rahul Mishra
 
Web1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSSWeb1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSS
NYCSS Meetup
 
Lesson 110 24 aug13-1400-ay
Lesson 110 24 aug13-1400-ayLesson 110 24 aug13-1400-ay
Lesson 110 24 aug13-1400-ay
Codecademy Ren
 
Dreamweaver
DreamweaverDreamweaver
Dreamweaver
chowders
 
Web Designing Bugs - Fixes By Nyros Developer
Web Designing Bugs - Fixes By Nyros DeveloperWeb Designing Bugs - Fixes By Nyros Developer
Web Designing Bugs - Fixes By Nyros Developer
Nyros Technologies
 
Rakshat bhati
Rakshat bhatiRakshat bhati
Rakshat bhati
Rakshat bhati
 
Upstate CSCI 450 WebDev Chapter 3
Upstate CSCI 450 WebDev Chapter 3Upstate CSCI 450 WebDev Chapter 3
Upstate CSCI 450 WebDev Chapter 3
DanWooster1
 
Css Architecture
Css ArchitectureCss Architecture
Css Architecture
pelletized
 
Session 2 intro to Css
Session 2 intro to CssSession 2 intro to Css
Session 2 intro to Css
Muhammad Hesham
 
Structuring your CSS for maintainability: rules and guile lines to write CSS
Structuring your CSS for maintainability: rules and guile lines to write CSSStructuring your CSS for maintainability: rules and guile lines to write CSS
Structuring your CSS for maintainability: rules and guile lines to write CSS
Sanjoy Kr. Paul
 
Organize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS TricksOrganize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS Tricks
Andolasoft Inc
 
6 Steps to Make Your CSS Code More Maintainable
6 Steps to Make Your CSS Code More Maintainable6 Steps to Make Your CSS Code More Maintainable
6 Steps to Make Your CSS Code More Maintainable
10Clouds
 
Web Development Workshop (Front End)
Web Development Workshop (Front End)Web Development Workshop (Front End)
Web Development Workshop (Front End)
DSCIIITLucknow
 
Style Your Site Part 1
Style Your Site Part 1Style Your Site Part 1
Style Your Site Part 1
Ben MacNeill
 
HTML CSS and Web Development
HTML CSS and Web DevelopmentHTML CSS and Web Development
HTML CSS and Web Development
Rahul Mishra
 
Web1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSSWeb1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSS
NYCSS Meetup
 
Lesson 110 24 aug13-1400-ay
Lesson 110 24 aug13-1400-ayLesson 110 24 aug13-1400-ay
Lesson 110 24 aug13-1400-ay
Codecademy Ren
 
Dreamweaver
DreamweaverDreamweaver
Dreamweaver
chowders
 
Web Designing Bugs - Fixes By Nyros Developer
Web Designing Bugs - Fixes By Nyros DeveloperWeb Designing Bugs - Fixes By Nyros Developer
Web Designing Bugs - Fixes By Nyros Developer
Nyros Technologies
 
Upstate CSCI 450 WebDev Chapter 3
Upstate CSCI 450 WebDev Chapter 3Upstate CSCI 450 WebDev Chapter 3
Upstate CSCI 450 WebDev Chapter 3
DanWooster1
 
Css Architecture
Css ArchitectureCss Architecture
Css Architecture
pelletized
 

Viewers also liked (8)

Lecture 8 Video
Lecture 8 VideoLecture 8 Video
Lecture 8 Video
Sur College of Applied Sciences
 
Navigation1 A
Navigation1 ANavigation1 A
Navigation1 A
Sur College of Applied Sciences
 
Lecture2 CSS 3
Lecture2   CSS 3Lecture2   CSS 3
Lecture2 CSS 3
Sur College of Applied Sciences
 
Lecture 5 XML
Lecture 5  XMLLecture 5  XML
Lecture 5 XML
Sur College of Applied Sciences
 
Lecture 9 Usability Orignal
Lecture 9 Usability OrignalLecture 9 Usability Orignal
Lecture 9 Usability Orignal
Sur College of Applied Sciences
 
Lecture11 A Image
Lecture11 A ImageLecture11 A Image
Lecture11 A Image
Sur College of Applied Sciences
 
Lecture 10 Image Format
Lecture 10  Image FormatLecture 10  Image Format
Lecture 10 Image Format
Sur College of Applied Sciences
 
Lecture 11 B Security
Lecture 11 B SecurityLecture 11 B Security
Lecture 11 B Security
Sur College of Applied Sciences
 
Ad

Similar to Lecture2 CSS1 (20)

Css
CssCss
Css
Venkat Krishnan
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
Marc Steel
 
Css
CssCss
Css
NIRMAL FELIX
 
CSS Part I
CSS Part ICSS Part I
CSS Part I
Doncho Minkov
 
Week3 css
Week3 cssWeek3 css
Week3 css
Rowena LI
 
Css
CssCss
Css
MAGNA COLLEGE OF ENGINEERING
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
nikhilsh66131
 
Introduction to Cascading Style Sheets
Introduction to Cascading Style SheetsIntroduction to Cascading Style Sheets
Introduction to Cascading Style Sheets
Tushar Joshi
 
This is css which compiled by alex that is impo
This is css which compiled by alex that is impoThis is css which compiled by alex that is impo
This is css which compiled by alex that is impo
AlebelAyalneh
 
Presentation on CSS, Style Sheet, Types of Styles, Types of Text Formatting, ...
Presentation on CSS, Style Sheet, Types of Styles, Types of Text Formatting, ...Presentation on CSS, Style Sheet, Types of Styles, Types of Text Formatting, ...
Presentation on CSS, Style Sheet, Types of Styles, Types of Text Formatting, ...
SripathiRavi1
 
4. Web Technology CSS Basics-1
4. Web Technology CSS Basics-14. Web Technology CSS Basics-1
4. Web Technology CSS Basics-1
Jyoti Yadav
 
HTML Web Devlopment presentation css.ppt
HTML Web Devlopment presentation css.pptHTML Web Devlopment presentation css.ppt
HTML Web Devlopment presentation css.ppt
raghavanp4
 
css.ppt
css.pptcss.ppt
css.ppt
Sana903754
 
css.ppt
css.pptcss.ppt
css.ppt
DakshPratapSingh1
 
Css
CssCss
Css
Balakumaran Arunachalam
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
Chris Poteet
 
basic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdfbasic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdf
elayelily
 
Introduction to css by programmerblog.net
Introduction to css by programmerblog.netIntroduction to css by programmerblog.net
Introduction to css by programmerblog.net
Programmer Blog
 
CSS
CSSCSS
CSS
anandha ganesh
 
Make Css easy(part:2) : easy tips for css(part:2)
Make Css easy(part:2) : easy tips for css(part:2)Make Css easy(part:2) : easy tips for css(part:2)
Make Css easy(part:2) : easy tips for css(part:2)
shabab shihan
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
Marc Steel
 
Introduction to Cascading Style Sheets
Introduction to Cascading Style SheetsIntroduction to Cascading Style Sheets
Introduction to Cascading Style Sheets
Tushar Joshi
 
This is css which compiled by alex that is impo
This is css which compiled by alex that is impoThis is css which compiled by alex that is impo
This is css which compiled by alex that is impo
AlebelAyalneh
 
Presentation on CSS, Style Sheet, Types of Styles, Types of Text Formatting, ...
Presentation on CSS, Style Sheet, Types of Styles, Types of Text Formatting, ...Presentation on CSS, Style Sheet, Types of Styles, Types of Text Formatting, ...
Presentation on CSS, Style Sheet, Types of Styles, Types of Text Formatting, ...
SripathiRavi1
 
4. Web Technology CSS Basics-1
4. Web Technology CSS Basics-14. Web Technology CSS Basics-1
4. Web Technology CSS Basics-1
Jyoti Yadav
 
HTML Web Devlopment presentation css.ppt
HTML Web Devlopment presentation css.pptHTML Web Devlopment presentation css.ppt
HTML Web Devlopment presentation css.ppt
raghavanp4
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
Chris Poteet
 
basic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdfbasic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdf
elayelily
 
Introduction to css by programmerblog.net
Introduction to css by programmerblog.netIntroduction to css by programmerblog.net
Introduction to css by programmerblog.net
Programmer Blog
 
Make Css easy(part:2) : easy tips for css(part:2)
Make Css easy(part:2) : easy tips for css(part:2)Make Css easy(part:2) : easy tips for css(part:2)
Make Css easy(part:2) : easy tips for css(part:2)
shabab shihan
 
Ad

More from Sur College of Applied Sciences (7)

Lecture 9 Professional Practices
Lecture 9 Professional PracticesLecture 9 Professional Practices
Lecture 9 Professional Practices
Sur College of Applied Sciences
 
Lecture 9 Accessibility Original
Lecture 9 Accessibility OriginalLecture 9 Accessibility Original
Lecture 9 Accessibility Original
Sur College of Applied Sciences
 
Accessibility Usability Professional Summry
Accessibility Usability Professional SummryAccessibility Usability Professional Summry
Accessibility Usability Professional Summry
Sur College of Applied Sciences
 
Lecture 6 Data Driven Design
Lecture 6  Data Driven DesignLecture 6  Data Driven Design
Lecture 6 Data Driven Design
Sur College of Applied Sciences
 
Lecture2 CSS 2
Lecture2  CSS 2Lecture2  CSS 2
Lecture2 CSS 2
Sur College of Applied Sciences
 
Lecture1 B Frames&Forms
Lecture1 B  Frames&FormsLecture1 B  Frames&Forms
Lecture1 B Frames&Forms
Sur College of Applied Sciences
 
Lecture 3 Javascript1
Lecture 3  Javascript1Lecture 3  Javascript1
Lecture 3 Javascript1
Sur College of Applied Sciences
 

Recently uploaded (20)

TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025
TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025
TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025
Quiz Club of PSG College of Arts & Science
 
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptxDiptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Arshad Shaikh
 
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Celine George
 
How to Manage Maintenance Request in Odoo 18
How to Manage Maintenance Request in Odoo 18How to Manage Maintenance Request in Odoo 18
How to Manage Maintenance Request in Odoo 18
Celine George
 
What is FIle and explanation of text files.pptx
What is FIle and explanation of text files.pptxWhat is FIle and explanation of text files.pptx
What is FIle and explanation of text files.pptx
Ramakrishna Reddy Bijjam
 
How to Manage & Create a New Department in Odoo 18 Employee
How to Manage & Create a New Department in Odoo 18 EmployeeHow to Manage & Create a New Department in Odoo 18 Employee
How to Manage & Create a New Department in Odoo 18 Employee
Celine George
 
Allomorps and word formation.pptx - Google Slides.pdf
Allomorps and word formation.pptx - Google Slides.pdfAllomorps and word formation.pptx - Google Slides.pdf
Allomorps and word formation.pptx - Google Slides.pdf
Abha Pandey
 
What are the benefits that dance brings?
What are the benefits that dance brings?What are the benefits that dance brings?
What are the benefits that dance brings?
memi27
 
How to Manage Upselling of Subscriptions in Odoo 18
How to Manage Upselling of Subscriptions in Odoo 18How to Manage Upselling of Subscriptions in Odoo 18
How to Manage Upselling of Subscriptions in Odoo 18
Celine George
 
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKANMATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
How to Configure Vendor Management in Lunch App of Odoo 18
How to Configure Vendor Management in Lunch App of Odoo 18How to Configure Vendor Management in Lunch App of Odoo 18
How to Configure Vendor Management in Lunch App of Odoo 18
Celine George
 
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
parmarjuli1412
 
BUSINESS QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 9 SEPTEMBER 2024
BUSINESS QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 9 SEPTEMBER 2024BUSINESS QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 9 SEPTEMBER 2024
BUSINESS QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 9 SEPTEMBER 2024
Quiz Club of PSG College of Arts & Science
 
Parenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independenceParenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independence
Pooky Knightsmith
 
Rose Cultivation Practices by Kushal Lamichhane.pdf
Rose Cultivation Practices by Kushal Lamichhane.pdfRose Cultivation Practices by Kushal Lamichhane.pdf
Rose Cultivation Practices by Kushal Lamichhane.pdf
kushallamichhame
 
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptxSEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
PoojaSen20
 
How to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 SalesHow to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 Sales
Celine George
 
Analysis of Quantitative Data Parametric and non-parametric tests.pptx
Analysis of Quantitative Data Parametric and non-parametric tests.pptxAnalysis of Quantitative Data Parametric and non-parametric tests.pptx
Analysis of Quantitative Data Parametric and non-parametric tests.pptx
Shrutidhara2
 
Black and White Illustrative Group Project Presentation.pdf (1).pdf
Black and White Illustrative Group Project Presentation.pdf (1).pdfBlack and White Illustrative Group Project Presentation.pdf (1).pdf
Black and White Illustrative Group Project Presentation.pdf (1).pdf
AnnasofiaUrsini
 
How to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 SlidesHow to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 Slides
Celine George
 
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptxDiptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Arshad Shaikh
 
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Celine George
 
How to Manage Maintenance Request in Odoo 18
How to Manage Maintenance Request in Odoo 18How to Manage Maintenance Request in Odoo 18
How to Manage Maintenance Request in Odoo 18
Celine George
 
What is FIle and explanation of text files.pptx
What is FIle and explanation of text files.pptxWhat is FIle and explanation of text files.pptx
What is FIle and explanation of text files.pptx
Ramakrishna Reddy Bijjam
 
How to Manage & Create a New Department in Odoo 18 Employee
How to Manage & Create a New Department in Odoo 18 EmployeeHow to Manage & Create a New Department in Odoo 18 Employee
How to Manage & Create a New Department in Odoo 18 Employee
Celine George
 
Allomorps and word formation.pptx - Google Slides.pdf
Allomorps and word formation.pptx - Google Slides.pdfAllomorps and word formation.pptx - Google Slides.pdf
Allomorps and word formation.pptx - Google Slides.pdf
Abha Pandey
 
What are the benefits that dance brings?
What are the benefits that dance brings?What are the benefits that dance brings?
What are the benefits that dance brings?
memi27
 
How to Manage Upselling of Subscriptions in Odoo 18
How to Manage Upselling of Subscriptions in Odoo 18How to Manage Upselling of Subscriptions in Odoo 18
How to Manage Upselling of Subscriptions in Odoo 18
Celine George
 
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKANMATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
How to Configure Vendor Management in Lunch App of Odoo 18
How to Configure Vendor Management in Lunch App of Odoo 18How to Configure Vendor Management in Lunch App of Odoo 18
How to Configure Vendor Management in Lunch App of Odoo 18
Celine George
 
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
parmarjuli1412
 
Parenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independenceParenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independence
Pooky Knightsmith
 
Rose Cultivation Practices by Kushal Lamichhane.pdf
Rose Cultivation Practices by Kushal Lamichhane.pdfRose Cultivation Practices by Kushal Lamichhane.pdf
Rose Cultivation Practices by Kushal Lamichhane.pdf
kushallamichhame
 
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptxSEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
PoojaSen20
 
How to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 SalesHow to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 Sales
Celine George
 
Analysis of Quantitative Data Parametric and non-parametric tests.pptx
Analysis of Quantitative Data Parametric and non-parametric tests.pptxAnalysis of Quantitative Data Parametric and non-parametric tests.pptx
Analysis of Quantitative Data Parametric and non-parametric tests.pptx
Shrutidhara2
 
Black and White Illustrative Group Project Presentation.pdf (1).pdf
Black and White Illustrative Group Project Presentation.pdf (1).pdfBlack and White Illustrative Group Project Presentation.pdf (1).pdf
Black and White Illustrative Group Project Presentation.pdf (1).pdf
AnnasofiaUrsini
 
How to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 SlidesHow to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 Slides
Celine George
 

Lecture2 CSS1

  • 1. Lecture 2: CSS I SFDV2001 Web Development
  • 2. Cascading Style Sheets You have experienced the limitation of presentation control in transitional HTML. Now you can forget about deprecated tags and experience the highly advanced presentation control afforded by CSS. With CSS: One file can completely control the appearance of ALL your HTML files. You have much, much greater control over appearance and behaviour of your page content. Web sites that use CSS are much easier to alter the appearance of.
  • 3. Cascading Style Sheets Transitional code is, generally speaking, consistently presented by most browsers. Switching to CSS to control all your presentation means much more work to get satisfactory behavior across a range of browsers. The power of CSS means that it is a lot more complicated than transitional HTML. There are many, many new stylistic controls and a new way of thinking about elements on your page. Your structural HTML skills need to be sound if you are to use your CSS sensibly. Writing sensible and efficient CSS code is harder than writing good HTML code.
  • 4. A little background W3C completed the CSS1 specifications in 1996. IE 3, released the same year, had some CSS support. CSS2 was published in 1998. Not until 2000, when IE 5 for Mac, was released did any browser have &quot;full&quot; CSS1 support. No browser has full CSS2 support. The latest versions of Safari and Opera pass the Acid2 test. Firefox and IE do not. IE currently fares worst. &quot;I’ll go ahead and relieve the suspense by saying we will not pass this test when IE7 ships.&quot; - Chris Wilson (IEBlog)
  • 5. Getting started Step 1. doctype: <!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot;> When you use CSS your HTML should conform to the HTML 4.01 strict standard. Step 2. Get rid of all deprecated tags and attributes: font align bgcolor etc. Your HTML should only describe the structure of your content, it should ideally contain no formatting information.
  • 6. Getting started Step 3. Add style information Internally: inline and embedded Externally: linked and imported 99% of the time linked is the best option. You may opt to have a few single-page specific styles embedded in an HTML document. Inline styles are really no better than <font> tags and there are very, very few good reasons for using them. Imported and embedded styles can be hidden from older browsers.
  • 7.  
  • 8.  
  • 9. CSS Rules Cascading style sheets consist of a series of rules that determine how your HTML content will be displayed. Rules take the format: selector{ property: value; } For example: body{ background-color: #ffe89d; }
  • 10. CSS Rules You add further property value pairs to an element's rule to more specifically control its appearance: body{ background-color: #ffe89d; color: #000e78; font-family: Arial, sans-serif; margin: 5%; } A style sheet consists of a series of such rules.
  • 11. Cascading It's probably fairly obvious how the &quot;style sheet&quot; bit of CSS applies, but the &quot;cascading&quot; bit isn't so obvious. The cascade in CSS is how styles take precedence over other styles. Because you can have many style rules in play, to avoid conflict certain style information overrides other.
  • 12. The cascade Least powerful: Browser default settings User browser settings Linked styles * Imported styles* Embedded styles** Inline styles Author !important rules Most powerful: User !important rules * Later files take precedence over earlier ones. ** Later rules have greater weight.
  • 13. The cascade You can alter the power hierarchy by using the !important indicator: selector{ property: value !important; } !important beats even inline styles. Think carefully before wielding such power - you have to ensure that the style is sensible in all circumstances.
  • 14.  
  • 15. Ultimately the user wins Users can take away your power with one click.
  • 16. Inheritance One of the things that makes CSS so efficient to use is the ability to have style rules inherited between parent and child elements. Parent Child <html> <body> <ol> <li> <ul> <li> <table> <tr> <tr> <td>
  • 19. Inheritance Many CSS properties are automatically inherited from an element's parent. You can explicitly set a property's value to inherit. Everything contained within you <body> tags is a child of the body. So, properties set for the body can be inherited by its children (like <p> or <h1> etc).
  • 20. Recommended sites: CSS Zen garden: http://www.csszengarden.com/ A List Apart's CSS articles: http://www.alistapart.com/topics/code/css/ W3C's CSS Home Page: http://www.w3.org/Style/CSS/ Further reading: Cascading Style Sheets the Definitive Guide by Eric A. Meyer CSS Cookbook by Christopher Schmitt

Editor's Notes

  • #3: Show CSS Zen Garden - Dave Shea (pronouned &amp;quot;shay&amp;quot;) Show CSS Zean Garden files - same HTML for all versions.
  • #5: Show web standards project site with Acid2 test. Internet Explorer 5.0 for the Macintosh, shipped in March of 2000, was the first browser to have full (better than 99 per cent) CSS1 support. Microsoft Internet Explorer , whose version 6 lacks support for about 30 percent of CSS2 properties, and, more significantly, misinterprets a significant number of important properties, such as &amp;quot;width&amp;quot;, &amp;quot;height&amp;quot;, and &amp;quot;float&amp;quot;. &amp;quot;We fully recognize that IE is behind the game today in CSS support. We’ve dug through the Acid 2 Test and analyzed IE’s problems with the test in some great detail, and we’ve made sure the bugs and features are on our list - however, there are some fairly large and difficult features to implement, and they will not all sort to the top of the stack in IE7. I believe we are doing a much better service to web developers out there in IE7 by fixing our known bang-your-head-on-the-desk bugs and usability problems first, and prioritizing the most commonly-requested features based on all the feedback we&apos;ve had.&amp;quot; - http://blogs.msdn.com/ie/archive/2005/07/29/445242.aspx
  • #8: You can use multiple linked or imported style sheets.
  • #9: You can use multiple linked or imported style sheets.
  • #14: User &amp;quot;!important&amp;quot; rules override author &amp;quot;!important&amp;quot; rules. This CSS feature improves accessibility of documents by giving users with special requirements (large fonts, color combinations, etc.) control over presentation.
  • #20: Play with inheritance code. - Show that font face inherits automatically. - Show that background color does not automatically inherit but text color does. - Show that list color is automatic, show how to force border inhertitance.