+ All Categories
Home > Education > Advance Web Designing - Lecture 02 / 30

Advance Web Designing - Lecture 02 / 30

Date post: 07-Apr-2017
Category:
Upload: alishanvr
View: 49 times
Download: 1 times
Share this document with a friend
27
ADVANCE WEB DESIGNING Lecture 02 [email protected] / http://www.therightsol.com 1
Transcript
Page 1: Advance Web Designing - Lecture 02 / 30

ADVANCE WEB DESIGNING

Lecture 02

[email protected] / http://www.therightsol.com 1

Page 2: Advance Web Designing - Lecture 02 / 30

WHAT WE WILL LEARN TODAY

• CSS Backgrounds

• CSS Text

• CSS [email protected] / http://www.therightsol.com 2

Page 3: Advance Web Designing - Lecture 02 / 30

CSS BACKGROUNDS

• We can change background color of an element

• OR we can use image as background element.

• We can also use a small image (pattern) as background image.

[email protected] / http://www.therightsol.com 3

Page 4: Advance Web Designing - Lecture 02 / 30

CSS BACKGROUNDS – CONT.

background-color:

• This property specify the background color of an element.

Value can be:

1. HEX value: like #ff0000

2. RGB value like "rgb(255,0,0)"

3. Color name like "red“[email protected] / http://www.therightsol.com 4

Page 5: Advance Web Designing - Lecture 02 / 30

CSS BACKGROUNDS – CONT.

Websites that can help you to choosing color combinations

• https://color.adobe.com/create/color-wheel/

• http://paletton.com/

• http://www.sessions.edu/[email protected] / http://www.therightsol.com 5

Page 6: Advance Web Designing - Lecture 02 / 30

CSS BACKGROUNDS – CONT.

Syntax:

To change background color:

background-color: #b0c4de;

To change background image:

background-image: url("paper.gif");

Example:

01 background-color.html

02 background-image.html

[email protected] / http://www.therightsol.com 6

Page 7: Advance Web Designing - Lecture 02 / 30

CSS BACKGROUNDS – CONT.

Repeating Background Image:

• background-image property repeats an image both horizontally and vertically by

default.

• If you want to repeat an image just horizontally or vertically then we can do that by

using background-repeat property.

Syntax:

background-repeat: repeat-x; OR background-repeat: repeat-y;

Example:

03 [email protected] / http://www.therightsol.com 7

Page 8: Advance Web Designing - Lecture 02 / 30

CSS BACKGROUNDS – CONT.

Showing an image only once:

• To display a background image only once, we need to use background-repeat

property with value no-repeat.

Syntax:

background-repeat: no-repeat;

Example:

04 norepeate.html

[email protected] / http://www.therightsol.com 8

Page 9: Advance Web Designing - Lecture 02 / 30

CSS BACKGROUNDS – CONT.

Background – Shorthand Property

Syntax:

• background: colorValue url(“imagepath.extension”) no-repeat;

Rule:

• background-color

• background-image

[email protected] / http://www.therightsol.com 9

Page 10: Advance Web Designing - Lecture 02 / 30

CSS TEXT

• We can change text color with color property. As:

• color: colorName | #Hex Code | rgb(red Value , green value, blue value)

Note:

1. Define background-color whenever you defined color property.

[email protected] / http://www.therightsol.com 10

Page 11: Advance Web Designing - Lecture 02 / 30

CSS TEXT – CONT.

Aligning the Text

We can align text with CSS property as under:

text-align: center | right | justify

Note:

• Kindly do not use justify as Justify is not supported by all browsers.

• Use in case if there is no any way to achieve the goal / requirement.

Example

05 text-align.html

[email protected] / http://www.therightsol.com 11

Page 12: Advance Web Designing - Lecture 02 / 30

CSS TEXT – CONT.

Decorating Text:

We can decorate text by using CSS property :

text-decoration: none | overline | line-through | underline

Note:

• Do not underline text that is not a link, as this confuses [email protected] / http://www.therightsol.com 12

Page 13: Advance Web Designing - Lecture 02 / 30

CSS TEXT – CONT.

Transoforming Text:

We can transform (change) text by using CSS property :

text-transform: uppercase | lowercase| capitalize

Capitalize transform first letter from each word to Capital.

Example:

06 – [email protected] / http://www.therightsol.com 13

Page 14: Advance Web Designing - Lecture 02 / 30

CSS TEXT – CONT.

Text Indent:

We can specify the indentation of the first line of a text as:

text-indent: value in px i.e. 50px

Example:

07 [email protected] / http://www.therightsol.com 14

Page 15: Advance Web Designing - Lecture 02 / 30

CSS TEXT – CONT.

Space between leters:

• letter-spacing property is used to change the space b/w letters.

Syntax:

letter-spacing: value in px

Note:

• We can also give negative value to letter-spacing property.

i.e. letter-spacing: -3px;[email protected] / http://www.therightsol.com 15

Page 16: Advance Web Designing - Lecture 02 / 30

CSS TEXT – CONT.

Example:

08 letter-spacing.html

[email protected] / http://www.therightsol.com 16

Page 17: Advance Web Designing - Lecture 02 / 30

CSS TEXT – CONT.

Space between lines (line height):

• Line-height property is used to change the line height b/w lines.

Syntax:

line-height: value in px | value in percentage

Example:

09 [email protected] / http://www.therightsol.com 17

Page 18: Advance Web Designing - Lecture 02 / 30

CSS TEXT – CONT.

Spce b/w words:

• word-spacing is used to change the space b/w words.

Syntax:

word-spacing: value in px

Note:

• We can also give negative value.

• Do not use percentage. Just use [email protected] / http://www.therightsol.com 18

Page 19: Advance Web Designing - Lecture 02 / 30

CSS TEXT – CONT.

Example:

10 word-spacing.html

[email protected] / http://www.therightsol.com 19

Page 20: Advance Web Designing - Lecture 02 / 30

CSS TEXT – CONT.

Text Shadow:

• text-shadow is used to add shadow to text.

Syntax:

text-shadow: h-shadow v-shadow blur-radius color ;

H-shadow x-axis value in px

V-shadow y-axis value in px

Blur-radius value in px

color name| hexcode| rgb(r,g,b)[email protected] / http://www.therightsol.com 20

Page 21: Advance Web Designing - Lecture 02 / 30

CSS TEXT – CONT.

Example:

11 - text-shadow.html

[email protected] / http://www.therightsol.com 21

Page 22: Advance Web Designing - Lecture 02 / 30

CSS TEXT – CONT.

Text Shadow (Animateable):

• text-shadow in CSS is animatable.

Syntax:

text-shadow: h-shadow v-shadow blur-radius color ;

H-shadow x-axis value in px

V-shadow y-axis value in px

Blur-radius value in px

color name| hexcode| rgb(r,g,b)[email protected] / http://www.therightsol.com 22

Page 23: Advance Web Designing - Lecture 02 / 30

CSS TEXT – CONT.

Example:

12 text-shadow-animateable.html

[email protected] / http://www.therightsol.com 23

Page 24: Advance Web Designing - Lecture 02 / 30

CSS FONT

• To change the font family of a text we use font-family property.

• We can give several font names to font-family property as “fallback system”.

• We should start with the font name that we want to use and ends with the

generic font family.

• Name should be in quotation marks, if font family is more than one [email protected] / http://www.therightsol.com 24

Page 25: Advance Web Designing - Lecture 02 / 30

CSS FONT – CONT.

Syntax:

font-family: first font name, second font name

For Example:

font-family: courier, Times, “Times New Roman”[email protected] / http://www.therightsol.com 25

Page 26: Advance Web Designing - Lecture 02 / 30

CSS FONT – CONT.

Example:

13 - font-family.html

[email protected] / http://www.therightsol.com 26

Page 27: Advance Web Designing - Lecture 02 / 30

Good Bye

&

Allah [email protected] / http://www.therightsol.com 27


Recommended