SlideShare a Scribd company logo
“
”
WEB PROGRAMMING
( Box model & Text flow, Media Types, Media Queries, Drop-Down
Menus, and Text Shadow)
Submittedby
Nagapandiyammal.N
M.Sccomputerscience
NADAR SARASWATHI COLLEGE OF ARTS & SCIENCE
CONTENT
BOX MODEL & TEXT FLOW
MEDIA TYPES
MEDIA QUERIES
DROP-DOWN MENUS
TEXT SHADOW
THE CSS BOX MODEL
 All HTML elements can be considered as boxes. In CSS, the term "box
model" is used when talking about design and layout.
 The CSS box model is essentially a box that wraps around every html
element. It consists of: margins, borders, padding, and the actual
content.
EXPLANATION OF THE DIFFERENT PARTS
 Content - the content of the box, where text and images appear
 Padding - clears an area around the content. The padding is transparent
 Border - A border that goes around the padding and content
 Margin - clears an area outside the border. The margin is transparent
• The box model allows us to add a border around elements, and to define space
between elements.
Example:
Demonstration of the box model:
div {
width: 300px;
border: 15px solid green;
padding: 50px;
margin: 20px;
}
TEXT-OVERFLOW
Definition and usage:
• The text-overflow property specifies how overflowed content that is not displayed
should be signaled to the user. It can be clipped, display an ellipsis (...), or display a
custom string.
• Both of the following properties are required for text-overflow:
• White-space: nowrap;
• Overflow: hidden;
Example
Use of the text-overflow property:
Div {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
Syntax
text-overflow: clip|ellipsis|string|initial|inherit;
CSS2 INTRODUCED MEDIA TYPES
 The @media rule, introduced in CSS2, made it possible to define different style rules
for different media types.
 Examples: you could have one set of style rules for computer screens, one for
printers, one for handheld devices, one for television-type devices, and so on.
 Unfortunately these media types never got a lot of support by devices, other than the
print media type.
 You can also have different style sheets for different media:
 <Link rel="stylesheet" media="mediatype and|not|only (expressions)"
href="print.Css">
CSS3 Media Types
Value Description
all Used for all media type devices
aural Intended for speech synthesizers
braille Feedback services
embossed Like printers
handheld Used in small screen, limited bandwidth
print Used for printers
projection Projectors or print to transparencies
screen Used for computer screens, tablets, smart-phones etc.
tty Using a fixed-pitch character grid teletypes(limited
display)
tv television type devices
MEDIA QUERIES
Media queries in CSS3 extended the CSS2 media types idea: instead of looking
for a type of device, they look at the capability of the device.
Media queries can be used to check many things, such as:
Width and height of the viewport
Width and height of the device
Orientation (is the tablet/phone in landscape or portrait mode?)
Resolution
Using media queries are a popular technique for delivering a tailored style sheet
to desktops, laptops, tablets, and mobile phones (such as iPhone and android
phones).
Media query syntax:
 A media query consists of a media type and can contain one or more expressions, which resolve
to either true or false.
@Media not|only mediatype and (expressions)
{
css-code;
}
 The result of the query is true if the specified media type matches the type of device the
document is being displayed on and all expressions in the media query are true. When a media
query is true, the corresponding style sheet or style rules are applied, following the normal
cascading rules.
 Unless you use the not or only operators, the media type is optional and the all type will be
implied.
Media queries simple examples
One way to use media queries is to have an alternate CSS section right inside your
style sheet.
The following example changes the background-color to lightgreen if the viewport is
480 pixels wide or wider (if the viewport is less than 480 pixels, the background-
color will be pink):
Example
@Media screen and (min-width: 480px) {
body {
background-color: lightgreen;
}
}
DROP-DOWN MENUS
 Create a dropdown menu that allows the user to choose an option from a list:
Basic dropdown
• Create a dropdown box that appears when the user moves the mouse over an
element.
Example
<Style>
.Dropdown {
position: relative;
display: inline-block;
}
.Dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
padding: 12px 16px;
z-index: 1;
}
.Dropdown:hover .Dropdown-content {
display: block;
}
</style>
<div class="dropdown">
<span>mouse over me</span>
<div class="dropdown-content">
<p>hello world!</P>
</div>
</div>
Right-aligned dropdown content
 If you want the dropdown menu to go from right to left, instead of left to right, add
right: 0;
Example
.Dropdown-content {
right: 0;
}
Dropdown image
 How to add an image and other content inside the dropdown box.
 Hover over the image:
CSS TEXT SHADOW
The CSS text-shadow property applies shadow to text.
In its simplest use, you only specify the horizontal shadow (2px) and
the vertical shadow (2px):
CSS syntax
Text-shadow: h-shadow v-shadow blur-radius color|none|initial|inherit;
Example
H1 {
text-shadow: 2px 2px;
}
 Next, add a color to the shadow:
Example
H1 {
text-shadow: 2px 2px red;
}
 Then, add a blur effect to the shadow:
Text shadow effect!
Example
H1 {
text-shadow: 2px 2px 5px red;
}
 The following example shows a white text with black shadow:
Example
H1 {
color: white;
text-shadow: 2px 2px 4px #000000;
}
 The following example shows a red neon glow shadow:
Example
H1 {
text-shadow: 0 0 3px #FF0000;
}
 The following example shows a white text with black, blue, and darkblue shadow:
Example
H1 {
color: white;
text-shadow: 1px 1px 2px black, 0 0 25px blue, 0 0 5px darkblue;
}
You can also use the text-shadow property to create a plain border around some text (without
shadows):
Example
H1 {
color: yellow;
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
}
Web Programming
Ad

More Related Content

What's hot (20)

Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
Amit Tyagi
 
Css
CssCss
Css
Hemant Saini
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
Sanjeev Kumar
 
Html forms
Html formsHtml forms
Html forms
Himanshu Pathak
 
Introduction to JavaScript (1).ppt
Introduction to JavaScript (1).pptIntroduction to JavaScript (1).ppt
Introduction to JavaScript (1).ppt
MuhammadRehan856177
 
Lab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptLab #2: Introduction to Javascript
Lab #2: Introduction to Javascript
Walid Ashraf
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
Gil Fink
 
HTML Block and Inline Elements
HTML Block and Inline ElementsHTML Block and Inline Elements
HTML Block and Inline Elements
Webtech Learning
 
jQuery from the very beginning
jQuery from the very beginningjQuery from the very beginning
jQuery from the very beginning
Anis Ahmad
 
Servlets
ServletsServlets
Servlets
Akshay Ballarpure
 
CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media Queries
Russ Weakley
 
javaScript.ppt
javaScript.pptjavaScript.ppt
javaScript.ppt
sentayehu
 
Css Ppt
Css PptCss Ppt
Css Ppt
Hema Prasanth
 
computer language - Html frames
computer language - Html framescomputer language - Html frames
computer language - Html frames
Dr. I. Uma Maheswari Maheswari
 
Javascript event handler
Javascript event handlerJavascript event handler
Javascript event handler
Jesus Obenita Jr.
 
Event In JavaScript
Event In JavaScriptEvent In JavaScript
Event In JavaScript
ShahDhruv21
 
Html introduction
Html introductionHtml introduction
Html introduction
Dalia Elbadry
 
Introduction to the DOM
Introduction to the DOMIntroduction to the DOM
Introduction to the DOM
tharaa abu ashour
 
Server Controls of ASP.Net
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.Net
Hitesh Santani
 
XML DTD and Schema
XML DTD and SchemaXML DTD and Schema
XML DTD and Schema
hamsa nandhini
 

Similar to Web Programming (20)

Mediaqueries
MediaqueriesMediaqueries
Mediaqueries
Brillio
 
CSS3 Media Queries And Creating Adaptive Layouts
CSS3 Media Queries And Creating Adaptive LayoutsCSS3 Media Queries And Creating Adaptive Layouts
CSS3 Media Queries And Creating Adaptive Layouts
Svitlana Ivanytska
 
Media queries A to Z
Media queries A to ZMedia queries A to Z
Media queries A to Z
Shameem Reza
 
CSS media types
CSS media typesCSS media types
CSS media types
Russ Weakley
 
Css
CssCss
Css
Rathan Raj
 
CSS-3 Course Slide
CSS-3 Course SlideCSS-3 Course Slide
CSS-3 Course Slide
BoneyGawande
 
Print CSS
Print CSSPrint CSS
Print CSS
Russ Weakley
 
Introduction to Responsive Web Design
Introduction to Responsive Web DesignIntroduction to Responsive Web Design
Introduction to Responsive Web Design
Shawn Calvert
 
Responsive web design tools and technique
Responsive web design tools and techniqueResponsive web design tools and technique
Responsive web design tools and technique
Nascenia IT
 
Html 3
Html   3Html   3
Html 3
pavishkumarsingh
 
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
 
CSS3 notes
CSS3 notesCSS3 notes
CSS3 notes
Rex Wang
 
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
 
3 css essentials
3 css essentials3 css essentials
3 css essentials
Anchu S
 
ICT Presentjrjdjdjdkkdkeeation Final.pptx
ICT Presentjrjdjdjdkkdkeeation Final.pptxICT Presentjrjdjdjdkkdkeeation Final.pptx
ICT Presentjrjdjdjdkkdkeeation Final.pptx
naziakhan111v
 
Pemrograman Web 2 - CSS
Pemrograman Web 2 - CSSPemrograman Web 2 - CSS
Pemrograman Web 2 - CSS
Nur Fadli Utomo
 
css-presentation.ppt
css-presentation.pptcss-presentation.ppt
css-presentation.ppt
MonishaAb1
 
Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3
Binu Paul
 
Pfnp slides
Pfnp slidesPfnp slides
Pfnp slides
William Myers
 
3-CSS_essentials.ppt
3-CSS_essentials.ppt3-CSS_essentials.ppt
3-CSS_essentials.ppt
datapro2
 
Mediaqueries
MediaqueriesMediaqueries
Mediaqueries
Brillio
 
CSS3 Media Queries And Creating Adaptive Layouts
CSS3 Media Queries And Creating Adaptive LayoutsCSS3 Media Queries And Creating Adaptive Layouts
CSS3 Media Queries And Creating Adaptive Layouts
Svitlana Ivanytska
 
Media queries A to Z
Media queries A to ZMedia queries A to Z
Media queries A to Z
Shameem Reza
 
CSS-3 Course Slide
CSS-3 Course SlideCSS-3 Course Slide
CSS-3 Course Slide
BoneyGawande
 
Introduction to Responsive Web Design
Introduction to Responsive Web DesignIntroduction to Responsive Web Design
Introduction to Responsive Web Design
Shawn Calvert
 
Responsive web design tools and technique
Responsive web design tools and techniqueResponsive web design tools and technique
Responsive web design tools and technique
Nascenia IT
 
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
 
CSS3 notes
CSS3 notesCSS3 notes
CSS3 notes
Rex Wang
 
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
 
3 css essentials
3 css essentials3 css essentials
3 css essentials
Anchu S
 
ICT Presentjrjdjdjdkkdkeeation Final.pptx
ICT Presentjrjdjdjdkkdkeeation Final.pptxICT Presentjrjdjdjdkkdkeeation Final.pptx
ICT Presentjrjdjdjdkkdkeeation Final.pptx
naziakhan111v
 
css-presentation.ppt
css-presentation.pptcss-presentation.ppt
css-presentation.ppt
MonishaAb1
 
Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3
Binu Paul
 
3-CSS_essentials.ppt
3-CSS_essentials.ppt3-CSS_essentials.ppt
3-CSS_essentials.ppt
datapro2
 
Ad

More from NilaNila16 (14)

Basic Block Scheduling
Basic Block SchedulingBasic Block Scheduling
Basic Block Scheduling
NilaNila16
 
Affine Array Indexes
Affine Array IndexesAffine Array Indexes
Affine Array Indexes
NilaNila16
 
Software Engineering
Software EngineeringSoftware Engineering
Software Engineering
NilaNila16
 
MapReduce Paradigm
MapReduce ParadigmMapReduce Paradigm
MapReduce Paradigm
NilaNila16
 
Hadoop Distributed File System
Hadoop Distributed File SystemHadoop Distributed File System
Hadoop Distributed File System
NilaNila16
 
Data Mining
Data MiningData Mining
Data Mining
NilaNila16
 
Operating system
Operating systemOperating system
Operating system
NilaNila16
 
RDBMS
RDBMSRDBMS
RDBMS
NilaNila16
 
Linear Block Codes
Linear Block CodesLinear Block Codes
Linear Block Codes
NilaNila16
 
Applications of graph theory
                      Applications of graph theory                      Applications of graph theory
Applications of graph theory
NilaNila16
 
Hasse Diagram
Hasse DiagramHasse Diagram
Hasse Diagram
NilaNila16
 
Fuzzy set
Fuzzy set Fuzzy set
Fuzzy set
NilaNila16
 
Recurrence Relation
Recurrence RelationRecurrence Relation
Recurrence Relation
NilaNila16
 
Input/Output Exploring java.io
Input/Output Exploring java.ioInput/Output Exploring java.io
Input/Output Exploring java.io
NilaNila16
 
Basic Block Scheduling
Basic Block SchedulingBasic Block Scheduling
Basic Block Scheduling
NilaNila16
 
Affine Array Indexes
Affine Array IndexesAffine Array Indexes
Affine Array Indexes
NilaNila16
 
Software Engineering
Software EngineeringSoftware Engineering
Software Engineering
NilaNila16
 
MapReduce Paradigm
MapReduce ParadigmMapReduce Paradigm
MapReduce Paradigm
NilaNila16
 
Hadoop Distributed File System
Hadoop Distributed File SystemHadoop Distributed File System
Hadoop Distributed File System
NilaNila16
 
Operating system
Operating systemOperating system
Operating system
NilaNila16
 
Linear Block Codes
Linear Block CodesLinear Block Codes
Linear Block Codes
NilaNila16
 
Applications of graph theory
                      Applications of graph theory                      Applications of graph theory
Applications of graph theory
NilaNila16
 
Recurrence Relation
Recurrence RelationRecurrence Relation
Recurrence Relation
NilaNila16
 
Input/Output Exploring java.io
Input/Output Exploring java.ioInput/Output Exploring java.io
Input/Output Exploring java.io
NilaNila16
 
Ad

Recently uploaded (20)

How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18
Celine George
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
Cultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptxCultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptx
UmeshTimilsina1
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
The History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptxThe History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFAMEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
Dr. Nasir Mustafa
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)
Mohamed Rizk Khodair
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
Cultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptxCultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptx
UmeshTimilsina1
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18
Celine George
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
Cultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptxCultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptx
UmeshTimilsina1
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFAMEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
Dr. Nasir Mustafa
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)
Mohamed Rizk Khodair
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
Cultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptxCultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptx
UmeshTimilsina1
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 

Web Programming

  • 1. “ ” WEB PROGRAMMING ( Box model & Text flow, Media Types, Media Queries, Drop-Down Menus, and Text Shadow) Submittedby Nagapandiyammal.N M.Sccomputerscience NADAR SARASWATHI COLLEGE OF ARTS & SCIENCE
  • 2. CONTENT BOX MODEL & TEXT FLOW MEDIA TYPES MEDIA QUERIES DROP-DOWN MENUS TEXT SHADOW
  • 3. THE CSS BOX MODEL  All HTML elements can be considered as boxes. In CSS, the term "box model" is used when talking about design and layout.  The CSS box model is essentially a box that wraps around every html element. It consists of: margins, borders, padding, and the actual content.
  • 4. EXPLANATION OF THE DIFFERENT PARTS  Content - the content of the box, where text and images appear  Padding - clears an area around the content. The padding is transparent  Border - A border that goes around the padding and content  Margin - clears an area outside the border. The margin is transparent • The box model allows us to add a border around elements, and to define space between elements. Example: Demonstration of the box model: div { width: 300px; border: 15px solid green; padding: 50px; margin: 20px; }
  • 5. TEXT-OVERFLOW Definition and usage: • The text-overflow property specifies how overflowed content that is not displayed should be signaled to the user. It can be clipped, display an ellipsis (...), or display a custom string. • Both of the following properties are required for text-overflow: • White-space: nowrap; • Overflow: hidden;
  • 6. Example Use of the text-overflow property: Div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } Syntax text-overflow: clip|ellipsis|string|initial|inherit;
  • 7. CSS2 INTRODUCED MEDIA TYPES  The @media rule, introduced in CSS2, made it possible to define different style rules for different media types.  Examples: you could have one set of style rules for computer screens, one for printers, one for handheld devices, one for television-type devices, and so on.  Unfortunately these media types never got a lot of support by devices, other than the print media type.  You can also have different style sheets for different media:  <Link rel="stylesheet" media="mediatype and|not|only (expressions)" href="print.Css">
  • 8. CSS3 Media Types Value Description all Used for all media type devices aural Intended for speech synthesizers braille Feedback services embossed Like printers handheld Used in small screen, limited bandwidth print Used for printers projection Projectors or print to transparencies screen Used for computer screens, tablets, smart-phones etc. tty Using a fixed-pitch character grid teletypes(limited display) tv television type devices
  • 9. MEDIA QUERIES Media queries in CSS3 extended the CSS2 media types idea: instead of looking for a type of device, they look at the capability of the device. Media queries can be used to check many things, such as: Width and height of the viewport Width and height of the device Orientation (is the tablet/phone in landscape or portrait mode?) Resolution Using media queries are a popular technique for delivering a tailored style sheet to desktops, laptops, tablets, and mobile phones (such as iPhone and android phones).
  • 10. Media query syntax:  A media query consists of a media type and can contain one or more expressions, which resolve to either true or false. @Media not|only mediatype and (expressions) { css-code; }  The result of the query is true if the specified media type matches the type of device the document is being displayed on and all expressions in the media query are true. When a media query is true, the corresponding style sheet or style rules are applied, following the normal cascading rules.  Unless you use the not or only operators, the media type is optional and the all type will be implied.
  • 11. Media queries simple examples One way to use media queries is to have an alternate CSS section right inside your style sheet. The following example changes the background-color to lightgreen if the viewport is 480 pixels wide or wider (if the viewport is less than 480 pixels, the background- color will be pink): Example @Media screen and (min-width: 480px) { body { background-color: lightgreen; } }
  • 12. DROP-DOWN MENUS  Create a dropdown menu that allows the user to choose an option from a list: Basic dropdown • Create a dropdown box that appears when the user moves the mouse over an element. Example <Style> .Dropdown { position: relative; display: inline-block; }
  • 13. .Dropdown-content { display: none; position: absolute; background-color: #f9f9f9; min-width: 160px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); padding: 12px 16px; z-index: 1; } .Dropdown:hover .Dropdown-content { display: block; } </style> <div class="dropdown"> <span>mouse over me</span> <div class="dropdown-content"> <p>hello world!</P> </div> </div>
  • 14. Right-aligned dropdown content  If you want the dropdown menu to go from right to left, instead of left to right, add right: 0; Example .Dropdown-content { right: 0; } Dropdown image  How to add an image and other content inside the dropdown box.  Hover over the image:
  • 15. CSS TEXT SHADOW The CSS text-shadow property applies shadow to text. In its simplest use, you only specify the horizontal shadow (2px) and the vertical shadow (2px): CSS syntax Text-shadow: h-shadow v-shadow blur-radius color|none|initial|inherit; Example H1 { text-shadow: 2px 2px; }
  • 16.  Next, add a color to the shadow: Example H1 { text-shadow: 2px 2px red; }  Then, add a blur effect to the shadow: Text shadow effect! Example H1 { text-shadow: 2px 2px 5px red; }
  • 17.  The following example shows a white text with black shadow: Example H1 { color: white; text-shadow: 2px 2px 4px #000000; }  The following example shows a red neon glow shadow: Example H1 { text-shadow: 0 0 3px #FF0000; }
  • 18.  The following example shows a white text with black, blue, and darkblue shadow: Example H1 { color: white; text-shadow: 1px 1px 2px black, 0 0 25px blue, 0 0 5px darkblue; } You can also use the text-shadow property to create a plain border around some text (without shadows): Example H1 { color: yellow; text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black; }
  翻译: