SlideShare a Scribd company logo
1 of 8
CSS SELECTORS
by
Noe Lopez
Mailto Syntax
<a href=”mailto:noe@gmail.com>
What everyone uses:
It works, but what if you want the email to go to more than 1
recipient, and include a subject line?
<a href=”mailto:noe@gmail.com,
noe@yahoo.com?subject=website-email”>
Targeting Chrome and Safari Browser
@media screen and (-webkit-min-device-pixel-ratio:0) {
body {
background: #54K37R;
}
}
The elements will only take effect on chrome and safari
browsers.
Targeting Firefox Browser
@-moz-document url-prefix() {
p {
background: #54K37R;
margin: 23px 45px 32px 90px
}
}
The elements will only take effect on Firefox browsers.
IE needs love too
p {
background: #54K37R;
margin: 23px 45px 32px 90px9;
margin: 23px 45px 32px 90px;
}
The elements will only take effect on Firefox browsers.
Well internet explorer you get love too, using a backslash
followed by a nine (9) after an element will automatically
target only ie browsers version 6 and up.
[rel=x]
<a rel=”external”> page title</a>
If no class or id is available using a simple “rel” element can
do the job.
a [rel=”extenal”] {
color: #561FDB;
text-transform: uppercase;
}
The rel elements can be really useful when targeting images,
and links within untouchable html.
Nth-Childs
nth-child is one of the most powerful elements in CSS. It can
be applied to any element in number sequence. In the example
the 3rd paragraph will be all upper case and have a different
background.
p:nth-child(3) {
background: #561FDB;
text-transform: uppercase;
}
p:last-child {
background: #F81256;
text-transform: uppercase;
}
p:first-child {
background: #1270F8;
text-transform: uppercase;
}
{Questions}
Mailto Syntax
Browser targets
[rel=x]
nth-child(){}
first-child{}
last-child{}

More Related Content

Viewers also liked

Undang undang perkoperasian
Undang undang  perkoperasianUndang undang  perkoperasian
Undang undang perkoperasian
tpsaragi
 
Nick Hatheway Dma Competencies 2011 12 (2)
Nick Hatheway Dma Competencies 2011 12 (2)Nick Hatheway Dma Competencies 2011 12 (2)
Nick Hatheway Dma Competencies 2011 12 (2)
nickhatheway
 
World healthnet
World healthnetWorld healthnet
World healthnet
erboreus
 

Viewers also liked (16)

A
AA
A
 
Журнал «Народний банкір» ~ Випуск №1 [2016]
Журнал «Народний банкір» ~ Випуск №1 [2016]Журнал «Народний банкір» ~ Випуск №1 [2016]
Журнал «Народний банкір» ~ Випуск №1 [2016]
 
Undang undang perkoperasian
Undang undang  perkoperasianUndang undang  perkoperasian
Undang undang perkoperasian
 
Skills.
Skills.Skills.
Skills.
 
Журнал «Народний банкір» ~ Випуск №2 [2016]
Журнал «Народний банкір» ~ Випуск №2 [2016] Журнал «Народний банкір» ~ Випуск №2 [2016]
Журнал «Народний банкір» ~ Випуск №2 [2016]
 
Vnz1
Vnz1Vnz1
Vnz1
 
Надійність ПУМБ у фактах та цифрах: весна 2015
Надійність ПУМБ у фактах та цифрах: весна 2015Надійність ПУМБ у фактах та цифрах: весна 2015
Надійність ПУМБ у фактах та цифрах: весна 2015
 
Borrar
BorrarBorrar
Borrar
 
Nick Hatheway Dma Competencies 2011 12 (2)
Nick Hatheway Dma Competencies 2011 12 (2)Nick Hatheway Dma Competencies 2011 12 (2)
Nick Hatheway Dma Competencies 2011 12 (2)
 
Textos argumentativos
Textos argumentativosTextos argumentativos
Textos argumentativos
 
FUIB has developed a new deposit “Calm”
FUIB has developed a new deposit “Calm”FUIB has developed a new deposit “Calm”
FUIB has developed a new deposit “Calm”
 
Long term evolution
Long term evolutionLong term evolution
Long term evolution
 
PUMB online corporate
PUMB online corporatePUMB online corporate
PUMB online corporate
 
World healthnet
World healthnetWorld healthnet
World healthnet
 
Presentation1
Presentation1Presentation1
Presentation1
 
10 warehouse management
10 warehouse management10 warehouse management
10 warehouse management
 

Similar to Browser Hacks and Nth-chind class selectors

Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
hstryk
 
Designing with CSS3 Effectively & Efficiently
Designing with CSS3 Effectively & EfficientlyDesigning with CSS3 Effectively & Efficiently
Designing with CSS3 Effectively & Efficiently
Zoe Gillenwater
 
Even faster web sites presentation 3
Even faster web sites presentation 3Even faster web sites presentation 3
Even faster web sites presentation 3
Felipe Lavín
 
1 Introduction to Drupal Web Development
1 Introduction to Drupal Web Development1 Introduction to Drupal Web Development
1 Introduction to Drupal Web Development
Wingston
 
Rounded Corners Everywhere
Rounded Corners EverywhereRounded Corners Everywhere
Rounded Corners Everywhere
sandiegoscott
 

Similar to Browser Hacks and Nth-chind class selectors (20)

Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pages
 
PHP Code And Search Engine Optimation
PHP Code And Search Engine OptimationPHP Code And Search Engine Optimation
PHP Code And Search Engine Optimation
 
Php White Hat Seo
Php White Hat SeoPhp White Hat Seo
Php White Hat Seo
 
Adobe MAX 2008: HTML/CSS + Fireworks
Adobe MAX 2008: HTML/CSS + FireworksAdobe MAX 2008: HTML/CSS + Fireworks
Adobe MAX 2008: HTML/CSS + Fireworks
 
Q and a design2 web
Q and a   design2 webQ and a   design2 web
Q and a design2 web
 
Quantum. Just Quantum
Quantum. Just QuantumQuantum. Just Quantum
Quantum. Just Quantum
 
Responsive content
Responsive contentResponsive content
Responsive content
 
DEF CON 27 - BEN SADEGHIPOUR - owning the clout through ssrf and pdf generators
DEF CON 27 - BEN SADEGHIPOUR  - owning the clout through ssrf and pdf generatorsDEF CON 27 - BEN SADEGHIPOUR  - owning the clout through ssrf and pdf generators
DEF CON 27 - BEN SADEGHIPOUR - owning the clout through ssrf and pdf generators
 
Ease into HTML5 and CSS3
Ease into HTML5 and CSS3Ease into HTML5 and CSS3
Ease into HTML5 and CSS3
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
The latest in site speed: advanced #webperf 2018
The latest in site speed: advanced #webperf 2018The latest in site speed: advanced #webperf 2018
The latest in site speed: advanced #webperf 2018
 
Controlling Web Typography
Controlling Web TypographyControlling Web Typography
Controlling Web Typography
 
CSS3: The Future is Now at DrupalCon San Francisco
CSS3: The Future is Now at DrupalCon San FranciscoCSS3: The Future is Now at DrupalCon San Francisco
CSS3: The Future is Now at DrupalCon San Francisco
 
Designing with CSS3 Effectively & Efficiently
Designing with CSS3 Effectively & EfficientlyDesigning with CSS3 Effectively & Efficiently
Designing with CSS3 Effectively & Efficiently
 
UI Developer(Frontend Developer)
UI Developer(Frontend Developer)UI Developer(Frontend Developer)
UI Developer(Frontend Developer)
 
Pertemuan 7
Pertemuan 7Pertemuan 7
Pertemuan 7
 
improve website performance
improve website performanceimprove website performance
improve website performance
 
Even faster web sites presentation 3
Even faster web sites presentation 3Even faster web sites presentation 3
Even faster web sites presentation 3
 
1 Introduction to Drupal Web Development
1 Introduction to Drupal Web Development1 Introduction to Drupal Web Development
1 Introduction to Drupal Web Development
 
Rounded Corners Everywhere
Rounded Corners EverywhereRounded Corners Everywhere
Rounded Corners Everywhere
 

Recently uploaded

SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
Peter Brusilovsky
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
EADTU
 

Recently uploaded (20)

Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 

Browser Hacks and Nth-chind class selectors

  • 2. Mailto Syntax <a href=”mailto:noe@gmail.com> What everyone uses: It works, but what if you want the email to go to more than 1 recipient, and include a subject line? <a href=”mailto:noe@gmail.com, noe@yahoo.com?subject=website-email”>
  • 3. Targeting Chrome and Safari Browser @media screen and (-webkit-min-device-pixel-ratio:0) { body { background: #54K37R; } } The elements will only take effect on chrome and safari browsers.
  • 4. Targeting Firefox Browser @-moz-document url-prefix() { p { background: #54K37R; margin: 23px 45px 32px 90px } } The elements will only take effect on Firefox browsers.
  • 5. IE needs love too p { background: #54K37R; margin: 23px 45px 32px 90px9; margin: 23px 45px 32px 90px; } The elements will only take effect on Firefox browsers. Well internet explorer you get love too, using a backslash followed by a nine (9) after an element will automatically target only ie browsers version 6 and up.
  • 6. [rel=x] <a rel=”external”> page title</a> If no class or id is available using a simple “rel” element can do the job. a [rel=”extenal”] { color: #561FDB; text-transform: uppercase; } The rel elements can be really useful when targeting images, and links within untouchable html.
  • 7. Nth-Childs nth-child is one of the most powerful elements in CSS. It can be applied to any element in number sequence. In the example the 3rd paragraph will be all upper case and have a different background. p:nth-child(3) { background: #561FDB; text-transform: uppercase; } p:last-child { background: #F81256; text-transform: uppercase; } p:first-child { background: #1270F8; text-transform: uppercase; }