SlideShare a Scribd company logo
1 of 31
CSS
BITM 3730
Developing Web Applications
9/26
Quick Review
• 3 Elements to a CSS Statement
• Selector
• What HTML sections does it affect?
• Property
• What attribute of that HTML section will be affected?
• Value
• What change will be made to that attribute?
Quick Review
• External – separate .css file
• Internal – inside the <style> tag
• Inline – on the same line of code using the style attribute
CSS Inheritance
• Used when you have many sections of a website/web page and want them to
look differently
• Each section can be modified using both internal and inline CSS code
• Works like programming languages, such as Java or Python
General CSS – Remember?
• Uses our tags like paragraph <p> or header <h1> or <body>
• <style>
• p {
• color: red;
• }
• </style>
Internal CSS
Inheritance CSS
• First, create a class
<style>
.bobdole {
background-color: red;
color: blue;
}
</style>
Internal CSS
Inheritance CSS
• Next, call the class
• <p class=“bobdole”>Chicken nuggets taste good</p>
Another Example
• <!DOCTYPE html>
• <html>
• <head>
• <style>
• .intro {
• background-color: yellow;
• }
• </style>
• </head>
• <body>
• <h1>Welcome to My Homepage</h1>
• <div class="intro">
• <p>My name is Jerry.</p>
• <p>George is unemployed and lives with his
parents.</p>
• </div>
• <p>My neighbor is Kramer.</p>
• <p class="intro">Gene sounds like Mickey.</p>
• </body>
• </html>
Overwriting Link Defaults
• a:link {color:#FF0000;}
• color to apply to link before it’s visited
• a:visited {color:#00FF00;}
• color to apply to link before it’s visited
• a:hover {color:#FF00FF;}
• color to apply to link while mouse pointer is over it
• a:active {color:#0000FF;}
• color to apply while left mouse button is held down on link
Link Defaults
• By default, a link will appear like this (in all browsers):
• An unvisited link is underlined and blue
• A visited link is underlined and purple
• An active link is underlined and red
• You can change the link state colors, by using CSS:
Create a page with Links
• <!DOCTYPE html>
• <html>
• <head>
• <style>
• </style>
• </head>
• <body>
• <p><a href="http://courses.shu.edu/BITM3730/marinom6/index.html">Homepage</p>
• <p><a href="http://courses.shu.edu/BITM3730/marinom6/work.html">My Work</p>
• <p><a href="http://courses.shu.edu/BITM3730/marinom6/contact.html">Contact</p>
• </body>
• </html>
Changing Link Defaults
• <style>
• a:link {color:red;}
• a:visited {color:blue;}
• a:hover {color:black;}
• a:active {color:red;}
• </style>
Changing How Links Look
• Remember how In Class Exercise 1 looked?
Changing How Links Look
Vertical <style> 1
• ul {
• list-style-type: none;
• margin: 0;
• padding: 0;
• width: 200px;
• background-color: #f1f1f1;
• }
Vertical <style> 2
• li a {
• display: block;
• color: #000;
• padding: 8px 16px;
• text-decoration: none;
• }
Vertical <style> 3
• /* Change the link color on hover */
• li a:hover {
• background-color: #555;
• color: white;
• }
Vertical <body>
• <ul>
• <li><a href="#home">Home</a></li>
• <li><a href="#teams">Favorite Sports Teams</a></li>
• <li><a href="#contact">Contact Me</a></li>
• </ul>
Horizontal <style> 1
• ul {
• list-style-type: none;
• margin: 0;
• padding: 0;
• overflow: hidden;
• border: 1px solid #e7e7e7;
• background-color: #f3f3f3;
• }
Horizontal <style> 2
• li {
• float: left;
• }
• li a {
• display: block;
• color: #666;
• text-align: center;
• padding: 14px 16px;
• text-decoration: none;
• }
Horizontal <style> 3
• li a:hover:not(.active) {
• background-color: #ddd;
• }
• li a.active {
• color: white;
• background-color: #04AA6D;
• }
Horizontal <body>
• <ul>
• <li><a class="active" href="#home">Home</a></li>
• <li><a href="#teams">Favorite Sports Teams</a></li>
• <li><a href="#contact">Contact Me</a></li>
• </ul>
Creating a Dropdown
Dropdown <style> 1
• body {
• font-family: Arial, Helvetica, sans-serif;
• }
• .navbar {
• overflow: hidden;
• background-color: #333;
• }
Dropdown <style> 2
• .navbar a {
• float: left;
• font-size: 16px;
• color: white;
• text-align: center;
• padding: 14px 16px;
• text-decoration: none;
• }
• .dropdown {
• float: left;
• overflow: hidden;
• }
Dropdown <style> 3
• .dropdown .dropbtn {
• font-size: 16px;
• border: none;
• outline: none;
• color: white;
• padding: 14px 16px;
• background-color: inherit;
• font-family: inherit;
• margin: 0;
• }
Dropdown <style> 4
• .navbar a:hover, .dropdown:hover .dropbtn {
• background-color: red;
• }
• .dropdown-content {
• display: none;
• position: absolute;
• background-color: #f9f9f9;
• min-width: 160px;
• box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
• z-index: 1;
• }
Dropdown <style> 5
• .dropdown-content a {
• float: none;
• color: black;
• padding: 12px 16px;
• text-decoration: none;
• display: block;
• text-align: left;
• }
• .dropdown-content a:hover {
• background-color: #ddd;
• }
• .dropdown:hover .dropdown-content {
• display: block;
• }
Dropdown <body>
• <div class="navbar">
• <a href="#home">Home</a>
• <a href="#contact">Contact Me</a>
• <div class="dropdown">
• <button class="dropbtn">Favorite Sports Teams
• <i class="fa fa-caret-down"></i>
• </button>
• <div class="dropdown-content">
• <a href="#">Yankees</a>
• <a href="#">49ers</a>
• <a href="#">Knicks</a>
• </div>
• </div>
• </div>
In Class Exercise
Change your html page created in In Class Exercise 1 to include CSS code so that your links and
paragraph section are different colors, size, and font. Make sure to use internal CSS code (i.e. code in the
HTML file).
CSS Assignment
• Create an HTML file called dropdown.html where you utilize internal CSS to
create a dropdown menu AND set CSS parameters [color, alignment, etc.]
for your headers and paragraphs.
• Your dropdown menu should include a Home, About Me, Class Info, and
Contact Me pages listed. Create dropdowns for both the About Me and
Class Info sections.

More Related Content

Similar to BITM3730 9-26.pptx

Make Css easy : easy tips for css
Make Css easy : easy tips for cssMake Css easy : easy tips for css
Make Css easy : easy tips for cssshabab shihan
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheetssmitha273566
 
WEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptxWEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptxkarthiksmart21
 
Web fundamental concept and tags
Web fundamental concept and tags Web fundamental concept and tags
Web fundamental concept and tags shameen khan
 
Css with example
Css with exampleCss with example
Css with examplereshmy12
 
Html Styles-CSS
Html Styles-CSSHtml Styles-CSS
Html Styles-CSSispkosova
 
LeSS in action
LeSS in actionLeSS in action
LeSS in actionPu Shiming
 
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 JAVApdfelayelily
 
html css intro sanskar , saurabh.pptx
html css intro  sanskar , saurabh.pptxhtml css intro  sanskar , saurabh.pptx
html css intro sanskar , saurabh.pptxSanskardubey24
 
Concept of CSS unit3
Concept of CSS unit3Concept of CSS unit3
Concept of CSS unit3SURBHI SAROHA
 
Ifi7174 lesson2
Ifi7174 lesson2Ifi7174 lesson2
Ifi7174 lesson2Sónia
 
HTML(5) and CSS(3) for beginners - I
HTML(5) and CSS(3) for beginners - IHTML(5) and CSS(3) for beginners - I
HTML(5) and CSS(3) for beginners - Ivincentleeuwen
 
BITM3730Week4.pptx
BITM3730Week4.pptxBITM3730Week4.pptx
BITM3730Week4.pptxMattMarino13
 
1-22-24 INFO 2106.pptx
1-22-24 INFO 2106.pptx1-22-24 INFO 2106.pptx
1-22-24 INFO 2106.pptxMattMarino13
 
Introduction to cascade style sheets CSS.pdf
Introduction to cascade style sheets CSS.pdfIntroduction to cascade style sheets CSS.pdf
Introduction to cascade style sheets CSS.pdfMahmoud268161
 

Similar to BITM3730 9-26.pptx (20)

CSS
CSSCSS
CSS
 
Basic HTML/CSS
Basic HTML/CSSBasic HTML/CSS
Basic HTML/CSS
 
Make Css easy : easy tips for css
Make Css easy : easy tips for cssMake Css easy : easy tips for css
Make Css easy : easy tips for css
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
WEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptxWEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptx
 
Web fundamental concept and tags
Web fundamental concept and tags Web fundamental concept and tags
Web fundamental concept and tags
 
Css with example
Css with exampleCss with example
Css with example
 
ARTDM 171, Week 5: CSS
ARTDM 171, Week 5: CSSARTDM 171, Week 5: CSS
ARTDM 171, Week 5: CSS
 
CSS
CSSCSS
CSS
 
Html Styles-CSS
Html Styles-CSSHtml Styles-CSS
Html Styles-CSS
 
LeSS in action
LeSS in actionLeSS in action
LeSS in action
 
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
 
html css intro sanskar , saurabh.pptx
html css intro  sanskar , saurabh.pptxhtml css intro  sanskar , saurabh.pptx
html css intro sanskar , saurabh.pptx
 
Concept of CSS unit3
Concept of CSS unit3Concept of CSS unit3
Concept of CSS unit3
 
Css1
Css1Css1
Css1
 
Ifi7174 lesson2
Ifi7174 lesson2Ifi7174 lesson2
Ifi7174 lesson2
 
HTML(5) and CSS(3) for beginners - I
HTML(5) and CSS(3) for beginners - IHTML(5) and CSS(3) for beginners - I
HTML(5) and CSS(3) for beginners - I
 
BITM3730Week4.pptx
BITM3730Week4.pptxBITM3730Week4.pptx
BITM3730Week4.pptx
 
1-22-24 INFO 2106.pptx
1-22-24 INFO 2106.pptx1-22-24 INFO 2106.pptx
1-22-24 INFO 2106.pptx
 
Introduction to cascade style sheets CSS.pdf
Introduction to cascade style sheets CSS.pdfIntroduction to cascade style sheets CSS.pdf
Introduction to cascade style sheets CSS.pdf
 

More from MattMarino13

1-24-24 INFO 3205.pptx
1-24-24 INFO 3205.pptx1-24-24 INFO 3205.pptx
1-24-24 INFO 3205.pptxMattMarino13
 
BITM3730 11-14.pptx
BITM3730 11-14.pptxBITM3730 11-14.pptx
BITM3730 11-14.pptxMattMarino13
 
01_Felke-Morris_Lecture_ppt_ch01.pptx
01_Felke-Morris_Lecture_ppt_ch01.pptx01_Felke-Morris_Lecture_ppt_ch01.pptx
01_Felke-Morris_Lecture_ppt_ch01.pptxMattMarino13
 
02slide_accessible.pptx
02slide_accessible.pptx02slide_accessible.pptx
02slide_accessible.pptxMattMarino13
 
Hoisington_Android_4e_PPT_CH01.pptx
Hoisington_Android_4e_PPT_CH01.pptxHoisington_Android_4e_PPT_CH01.pptx
Hoisington_Android_4e_PPT_CH01.pptxMattMarino13
 
AndroidHTP3_AppA.pptx
AndroidHTP3_AppA.pptxAndroidHTP3_AppA.pptx
AndroidHTP3_AppA.pptxMattMarino13
 
9780357132302_Langley11e_ch1_LEAP.pptx
9780357132302_Langley11e_ch1_LEAP.pptx9780357132302_Langley11e_ch1_LEAP.pptx
9780357132302_Langley11e_ch1_LEAP.pptxMattMarino13
 
krajewski_om12 _01.pptx
krajewski_om12 _01.pptxkrajewski_om12 _01.pptx
krajewski_om12 _01.pptxMattMarino13
 
CapsimOpsIntroPPT.Marino.pptx
CapsimOpsIntroPPT.Marino.pptxCapsimOpsIntroPPT.Marino.pptx
CapsimOpsIntroPPT.Marino.pptxMattMarino13
 
Project Presentation_castroxa_attempt_2021-12-05-18-30-10_No Cap.pptx
Project Presentation_castroxa_attempt_2021-12-05-18-30-10_No Cap.pptxProject Presentation_castroxa_attempt_2021-12-05-18-30-10_No Cap.pptx
Project Presentation_castroxa_attempt_2021-12-05-18-30-10_No Cap.pptxMattMarino13
 
Project Presentation_mirzamad_attempt_2021-12-05-23-35-25_HTML_presentation.pptx
Project Presentation_mirzamad_attempt_2021-12-05-23-35-25_HTML_presentation.pptxProject Presentation_mirzamad_attempt_2021-12-05-23-35-25_HTML_presentation.pptx
Project Presentation_mirzamad_attempt_2021-12-05-23-35-25_HTML_presentation.pptxMattMarino13
 
Project Presentation_padillni_attempt_2021-12-05-18-52-37_Web Application Pre...
Project Presentation_padillni_attempt_2021-12-05-18-52-37_Web Application Pre...Project Presentation_padillni_attempt_2021-12-05-18-52-37_Web Application Pre...
Project Presentation_padillni_attempt_2021-12-05-18-52-37_Web Application Pre...MattMarino13
 
Project Presentation_thomasb1_attempt_2021-12-05-17-50-13_Developing Web Apps...
Project Presentation_thomasb1_attempt_2021-12-05-17-50-13_Developing Web Apps...Project Presentation_thomasb1_attempt_2021-12-05-17-50-13_Developing Web Apps...
Project Presentation_thomasb1_attempt_2021-12-05-17-50-13_Developing Web Apps...MattMarino13
 
Project Presentation_hernana1_attempt_2021-12-05-22-06-56_Miyamoto BITM 3730 ...
Project Presentation_hernana1_attempt_2021-12-05-22-06-56_Miyamoto BITM 3730 ...Project Presentation_hernana1_attempt_2021-12-05-22-06-56_Miyamoto BITM 3730 ...
Project Presentation_hernana1_attempt_2021-12-05-22-06-56_Miyamoto BITM 3730 ...MattMarino13
 
1-23-19 Agenda.pptx
1-23-19 Agenda.pptx1-23-19 Agenda.pptx
1-23-19 Agenda.pptxMattMarino13
 
EDF 8289 Marino PPT.pptx
EDF 8289 Marino PPT.pptxEDF 8289 Marino PPT.pptx
EDF 8289 Marino PPT.pptxMattMarino13
 
Agenda January 20th 2016.pptx
Agenda January 20th 2016.pptxAgenda January 20th 2016.pptx
Agenda January 20th 2016.pptxMattMarino13
 
BITM3730 8-29.pptx
BITM3730 8-29.pptxBITM3730 8-29.pptx
BITM3730 8-29.pptxMattMarino13
 
BITM3730 8-30.pptx
BITM3730 8-30.pptxBITM3730 8-30.pptx
BITM3730 8-30.pptxMattMarino13
 
BITM3730Week1.pptx
BITM3730Week1.pptxBITM3730Week1.pptx
BITM3730Week1.pptxMattMarino13
 

More from MattMarino13 (20)

1-24-24 INFO 3205.pptx
1-24-24 INFO 3205.pptx1-24-24 INFO 3205.pptx
1-24-24 INFO 3205.pptx
 
BITM3730 11-14.pptx
BITM3730 11-14.pptxBITM3730 11-14.pptx
BITM3730 11-14.pptx
 
01_Felke-Morris_Lecture_ppt_ch01.pptx
01_Felke-Morris_Lecture_ppt_ch01.pptx01_Felke-Morris_Lecture_ppt_ch01.pptx
01_Felke-Morris_Lecture_ppt_ch01.pptx
 
02slide_accessible.pptx
02slide_accessible.pptx02slide_accessible.pptx
02slide_accessible.pptx
 
Hoisington_Android_4e_PPT_CH01.pptx
Hoisington_Android_4e_PPT_CH01.pptxHoisington_Android_4e_PPT_CH01.pptx
Hoisington_Android_4e_PPT_CH01.pptx
 
AndroidHTP3_AppA.pptx
AndroidHTP3_AppA.pptxAndroidHTP3_AppA.pptx
AndroidHTP3_AppA.pptx
 
9780357132302_Langley11e_ch1_LEAP.pptx
9780357132302_Langley11e_ch1_LEAP.pptx9780357132302_Langley11e_ch1_LEAP.pptx
9780357132302_Langley11e_ch1_LEAP.pptx
 
krajewski_om12 _01.pptx
krajewski_om12 _01.pptxkrajewski_om12 _01.pptx
krajewski_om12 _01.pptx
 
CapsimOpsIntroPPT.Marino.pptx
CapsimOpsIntroPPT.Marino.pptxCapsimOpsIntroPPT.Marino.pptx
CapsimOpsIntroPPT.Marino.pptx
 
Project Presentation_castroxa_attempt_2021-12-05-18-30-10_No Cap.pptx
Project Presentation_castroxa_attempt_2021-12-05-18-30-10_No Cap.pptxProject Presentation_castroxa_attempt_2021-12-05-18-30-10_No Cap.pptx
Project Presentation_castroxa_attempt_2021-12-05-18-30-10_No Cap.pptx
 
Project Presentation_mirzamad_attempt_2021-12-05-23-35-25_HTML_presentation.pptx
Project Presentation_mirzamad_attempt_2021-12-05-23-35-25_HTML_presentation.pptxProject Presentation_mirzamad_attempt_2021-12-05-23-35-25_HTML_presentation.pptx
Project Presentation_mirzamad_attempt_2021-12-05-23-35-25_HTML_presentation.pptx
 
Project Presentation_padillni_attempt_2021-12-05-18-52-37_Web Application Pre...
Project Presentation_padillni_attempt_2021-12-05-18-52-37_Web Application Pre...Project Presentation_padillni_attempt_2021-12-05-18-52-37_Web Application Pre...
Project Presentation_padillni_attempt_2021-12-05-18-52-37_Web Application Pre...
 
Project Presentation_thomasb1_attempt_2021-12-05-17-50-13_Developing Web Apps...
Project Presentation_thomasb1_attempt_2021-12-05-17-50-13_Developing Web Apps...Project Presentation_thomasb1_attempt_2021-12-05-17-50-13_Developing Web Apps...
Project Presentation_thomasb1_attempt_2021-12-05-17-50-13_Developing Web Apps...
 
Project Presentation_hernana1_attempt_2021-12-05-22-06-56_Miyamoto BITM 3730 ...
Project Presentation_hernana1_attempt_2021-12-05-22-06-56_Miyamoto BITM 3730 ...Project Presentation_hernana1_attempt_2021-12-05-22-06-56_Miyamoto BITM 3730 ...
Project Presentation_hernana1_attempt_2021-12-05-22-06-56_Miyamoto BITM 3730 ...
 
1-23-19 Agenda.pptx
1-23-19 Agenda.pptx1-23-19 Agenda.pptx
1-23-19 Agenda.pptx
 
EDF 8289 Marino PPT.pptx
EDF 8289 Marino PPT.pptxEDF 8289 Marino PPT.pptx
EDF 8289 Marino PPT.pptx
 
Agenda January 20th 2016.pptx
Agenda January 20th 2016.pptxAgenda January 20th 2016.pptx
Agenda January 20th 2016.pptx
 
BITM3730 8-29.pptx
BITM3730 8-29.pptxBITM3730 8-29.pptx
BITM3730 8-29.pptx
 
BITM3730 8-30.pptx
BITM3730 8-30.pptxBITM3730 8-30.pptx
BITM3730 8-30.pptx
 
BITM3730Week1.pptx
BITM3730Week1.pptxBITM3730Week1.pptx
BITM3730Week1.pptx
 

Recently uploaded

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 

Recently uploaded (20)

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 

BITM3730 9-26.pptx

  • 1. CSS BITM 3730 Developing Web Applications 9/26
  • 2. Quick Review • 3 Elements to a CSS Statement • Selector • What HTML sections does it affect? • Property • What attribute of that HTML section will be affected? • Value • What change will be made to that attribute?
  • 3. Quick Review • External – separate .css file • Internal – inside the <style> tag • Inline – on the same line of code using the style attribute
  • 4. CSS Inheritance • Used when you have many sections of a website/web page and want them to look differently • Each section can be modified using both internal and inline CSS code • Works like programming languages, such as Java or Python
  • 5. General CSS – Remember? • Uses our tags like paragraph <p> or header <h1> or <body> • <style> • p { • color: red; • } • </style> Internal CSS
  • 6. Inheritance CSS • First, create a class <style> .bobdole { background-color: red; color: blue; } </style> Internal CSS
  • 7. Inheritance CSS • Next, call the class • <p class=“bobdole”>Chicken nuggets taste good</p>
  • 8. Another Example • <!DOCTYPE html> • <html> • <head> • <style> • .intro { • background-color: yellow; • } • </style> • </head> • <body> • <h1>Welcome to My Homepage</h1> • <div class="intro"> • <p>My name is Jerry.</p> • <p>George is unemployed and lives with his parents.</p> • </div> • <p>My neighbor is Kramer.</p> • <p class="intro">Gene sounds like Mickey.</p> • </body> • </html>
  • 9. Overwriting Link Defaults • a:link {color:#FF0000;} • color to apply to link before it’s visited • a:visited {color:#00FF00;} • color to apply to link before it’s visited • a:hover {color:#FF00FF;} • color to apply to link while mouse pointer is over it • a:active {color:#0000FF;} • color to apply while left mouse button is held down on link
  • 10. Link Defaults • By default, a link will appear like this (in all browsers): • An unvisited link is underlined and blue • A visited link is underlined and purple • An active link is underlined and red • You can change the link state colors, by using CSS:
  • 11. Create a page with Links • <!DOCTYPE html> • <html> • <head> • <style> • </style> • </head> • <body> • <p><a href="http://courses.shu.edu/BITM3730/marinom6/index.html">Homepage</p> • <p><a href="http://courses.shu.edu/BITM3730/marinom6/work.html">My Work</p> • <p><a href="http://courses.shu.edu/BITM3730/marinom6/contact.html">Contact</p> • </body> • </html>
  • 12. Changing Link Defaults • <style> • a:link {color:red;} • a:visited {color:blue;} • a:hover {color:black;} • a:active {color:red;} • </style>
  • 13. Changing How Links Look • Remember how In Class Exercise 1 looked?
  • 15. Vertical <style> 1 • ul { • list-style-type: none; • margin: 0; • padding: 0; • width: 200px; • background-color: #f1f1f1; • }
  • 16. Vertical <style> 2 • li a { • display: block; • color: #000; • padding: 8px 16px; • text-decoration: none; • }
  • 17. Vertical <style> 3 • /* Change the link color on hover */ • li a:hover { • background-color: #555; • color: white; • }
  • 18. Vertical <body> • <ul> • <li><a href="#home">Home</a></li> • <li><a href="#teams">Favorite Sports Teams</a></li> • <li><a href="#contact">Contact Me</a></li> • </ul>
  • 19. Horizontal <style> 1 • ul { • list-style-type: none; • margin: 0; • padding: 0; • overflow: hidden; • border: 1px solid #e7e7e7; • background-color: #f3f3f3; • }
  • 20. Horizontal <style> 2 • li { • float: left; • } • li a { • display: block; • color: #666; • text-align: center; • padding: 14px 16px; • text-decoration: none; • }
  • 21. Horizontal <style> 3 • li a:hover:not(.active) { • background-color: #ddd; • } • li a.active { • color: white; • background-color: #04AA6D; • }
  • 22. Horizontal <body> • <ul> • <li><a class="active" href="#home">Home</a></li> • <li><a href="#teams">Favorite Sports Teams</a></li> • <li><a href="#contact">Contact Me</a></li> • </ul>
  • 24. Dropdown <style> 1 • body { • font-family: Arial, Helvetica, sans-serif; • } • .navbar { • overflow: hidden; • background-color: #333; • }
  • 25. Dropdown <style> 2 • .navbar a { • float: left; • font-size: 16px; • color: white; • text-align: center; • padding: 14px 16px; • text-decoration: none; • } • .dropdown { • float: left; • overflow: hidden; • }
  • 26. Dropdown <style> 3 • .dropdown .dropbtn { • font-size: 16px; • border: none; • outline: none; • color: white; • padding: 14px 16px; • background-color: inherit; • font-family: inherit; • margin: 0; • }
  • 27. Dropdown <style> 4 • .navbar a:hover, .dropdown:hover .dropbtn { • background-color: red; • } • .dropdown-content { • display: none; • position: absolute; • background-color: #f9f9f9; • min-width: 160px; • box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); • z-index: 1; • }
  • 28. Dropdown <style> 5 • .dropdown-content a { • float: none; • color: black; • padding: 12px 16px; • text-decoration: none; • display: block; • text-align: left; • } • .dropdown-content a:hover { • background-color: #ddd; • } • .dropdown:hover .dropdown-content { • display: block; • }
  • 29. Dropdown <body> • <div class="navbar"> • <a href="#home">Home</a> • <a href="#contact">Contact Me</a> • <div class="dropdown"> • <button class="dropbtn">Favorite Sports Teams • <i class="fa fa-caret-down"></i> • </button> • <div class="dropdown-content"> • <a href="#">Yankees</a> • <a href="#">49ers</a> • <a href="#">Knicks</a> • </div> • </div> • </div>
  • 30. In Class Exercise Change your html page created in In Class Exercise 1 to include CSS code so that your links and paragraph section are different colors, size, and font. Make sure to use internal CSS code (i.e. code in the HTML file).
  • 31. CSS Assignment • Create an HTML file called dropdown.html where you utilize internal CSS to create a dropdown menu AND set CSS parameters [color, alignment, etc.] for your headers and paragraphs. • Your dropdown menu should include a Home, About Me, Class Info, and Contact Me pages listed. Create dropdowns for both the About Me and Class Info sections.