SlideShare a Scribd company logo
1 of 11
Download to read offline
WDES106
CSS Advanced -- Part 1




                    about.me/babon
CSS Advanced Topics
CSS Pseudo-class (Part 2)
CSS Pseudo-element (Part 2)
CSS Navigation Bar (Part 1)
CSS Image Gallery (Part 1)
CSS Image Opacity (Part 1)
CSS Image Sprites (Part 1)
CSS Media Types (Part 2)
CSS Attribute Selectors (Part 2)

                                   about.me/babon
CSS Navigation Bar
There are two ways to create a horizontal
navigation bar. Using inline or floating list items.

Both methods work fine, but if you want the
links to be the same size, you have to use the
floating method.




                                     about.me/babon
CSS Navigation Bar
inline method

li {
       display: inline;
}

By default, <li> elements are block elements.
Here, remove the line breaks before and after
each list item, to display them on one line
                                 about.me/babon
CSS Navigation Bar
floating method

li {
       float: left;
}
a{
       display: block;
       width: 60px;
}
                         about.me/babon
CSS Navigation Bar
float: left;
● use float to get block elements to slide next
   to each other

display: block;
● displaying the links as block elements makes
   the whole link area clickable (not just the
   text), and it allows us to specify the width

                                   about.me/babon
CSS Navigation Bar
width: 60px;
● since block elements take up the full width
  available, they cannot float next to each
  other. We specify the width of the links to
  60px.




                                  about.me/babon
CSS Image Gallery
Use jQuery instead to handle image galleries.

See jQuery jAM Tutorials




                                 about.me/babon
CSS Image Opacity
IE9, Firefox, Chrome, Opera, and Safari use
the property opacity for transparency.
● takes a value from 0.0 - 1.0. A lower value
   makes the element more transparent.




                                  about.me/babon
CSS Image Opacity
IE8 and earlier use filter:alpha(opacity=x).
● the x can take a value from 0 - 100. A lower
  value makes the element more transparent.

opacity.html




                                  about.me/babon
CSS Image Sprite
Use one single image to capture all navigation
states.
● no loading delay when a user hovers over
   the image.

image | sprites.html

Apple Style CSS Sprite Menu

                                  about.me/babon

More Related Content

Similar to WDES106 CSS Advanced Part 1

07. session 07 adv css properties
07. session 07   adv css properties07. session 07   adv css properties
07. session 07 adv css properties
Phúc Đỗ
 
10 CSS Tricks and Tips to Create Astounding Websites
10 CSS Tricks and Tips to Create Astounding Websites10 CSS Tricks and Tips to Create Astounding Websites
10 CSS Tricks and Tips to Create Astounding Websites
Syntactics Inc.
 

Similar to WDES106 CSS Advanced Part 1 (20)

Art of css
Art of cssArt of css
Art of css
 
07. session 07 adv css properties
07. session 07   adv css properties07. session 07   adv css properties
07. session 07 adv css properties
 
10 CSS Tricks and Tips to Create Astounding Websites
10 CSS Tricks and Tips to Create Astounding Websites10 CSS Tricks and Tips to Create Astounding Websites
10 CSS Tricks and Tips to Create Astounding Websites
 
Designing for the web - 101
Designing for the web - 101Designing for the web - 101
Designing for the web - 101
 
Lecture2 CSS 3
Lecture2   CSS 3Lecture2   CSS 3
Lecture2 CSS 3
 
Css training
Css trainingCss training
Css training
 
Advanced CSS.pptx
Advanced CSS.pptxAdvanced CSS.pptx
Advanced CSS.pptx
 
Lecture-8.pptx
Lecture-8.pptxLecture-8.pptx
Lecture-8.pptx
 
Page layout with css
Page layout with cssPage layout with css
Page layout with css
 
Css layout
Css layoutCss layout
Css layout
 
CSS3 PPT.pptx
CSS3 PPT.pptxCSS3 PPT.pptx
CSS3 PPT.pptx
 
Web Layout
Web LayoutWeb Layout
Web Layout
 
CSS Layout
CSS LayoutCSS Layout
CSS Layout
 
Css advanced – session 4
Css advanced – session 4Css advanced – session 4
Css advanced – session 4
 
Lecture-13.pptx
Lecture-13.pptxLecture-13.pptx
Lecture-13.pptx
 
Concept of CSS part 2
Concept of CSS part 2Concept of CSS part 2
Concept of CSS part 2
 
CSS_Dibbo
CSS_DibboCSS_Dibbo
CSS_Dibbo
 
CSS and CSS3
CSS and CSS3CSS and CSS3
CSS and CSS3
 
CSS
CSSCSS
CSS
 
Floating power point
Floating power pointFloating power point
Floating power point
 

More from Gene Babon (20)

Job Search | Tropical Depressions | Bowling Alleys
Job Search | Tropical Depressions | Bowling AlleysJob Search | Tropical Depressions | Bowling Alleys
Job Search | Tropical Depressions | Bowling Alleys
 
Tech Over Fifty Launch Meeting
Tech Over Fifty Launch MeetingTech Over Fifty Launch Meeting
Tech Over Fifty Launch Meeting
 
Anatomy Virtual Self Study Group NEPHP 2018
Anatomy Virtual Self Study Group NEPHP 2018Anatomy Virtual Self Study Group NEPHP 2018
Anatomy Virtual Self Study Group NEPHP 2018
 
Become a Front End Web Developer
Become a Front End Web DeveloperBecome a Front End Web Developer
Become a Front End Web Developer
 
Navigating a Career in Web Technology
Navigating a Career in Web TechnologyNavigating a Career in Web Technology
Navigating a Career in Web Technology
 
Info Session
Info SessionInfo Session
Info Session
 
Info session
Info sessionInfo session
Info session
 
Getting Things Done
Getting Things DoneGetting Things Done
Getting Things Done
 
jQuery Mobile Hour 4
jQuery Mobile Hour 4jQuery Mobile Hour 4
jQuery Mobile Hour 4
 
Lesson 17
Lesson 17Lesson 17
Lesson 17
 
Lesson 18
Lesson 18Lesson 18
Lesson 18
 
Lesson 17
Lesson 17Lesson 17
Lesson 17
 
Lesson 16
Lesson 16Lesson 16
Lesson 16
 
Lesson 15
Lesson 15Lesson 15
Lesson 15
 
Lesson 11
Lesson 11Lesson 11
Lesson 11
 
Lesson 10
Lesson 10Lesson 10
Lesson 10
 
Lesson 09
Lesson 09Lesson 09
Lesson 09
 
Lesson 05
Lesson 05Lesson 05
Lesson 05
 
Lesson 04
Lesson 04Lesson 04
Lesson 04
 
Lesson 03
Lesson 03Lesson 03
Lesson 03
 

WDES106 CSS Advanced Part 1

  • 1. WDES106 CSS Advanced -- Part 1 about.me/babon
  • 2. CSS Advanced Topics CSS Pseudo-class (Part 2) CSS Pseudo-element (Part 2) CSS Navigation Bar (Part 1) CSS Image Gallery (Part 1) CSS Image Opacity (Part 1) CSS Image Sprites (Part 1) CSS Media Types (Part 2) CSS Attribute Selectors (Part 2) about.me/babon
  • 3. CSS Navigation Bar There are two ways to create a horizontal navigation bar. Using inline or floating list items. Both methods work fine, but if you want the links to be the same size, you have to use the floating method. about.me/babon
  • 4. CSS Navigation Bar inline method li { display: inline; } By default, <li> elements are block elements. Here, remove the line breaks before and after each list item, to display them on one line about.me/babon
  • 5. CSS Navigation Bar floating method li { float: left; } a{ display: block; width: 60px; } about.me/babon
  • 6. CSS Navigation Bar float: left; ● use float to get block elements to slide next to each other display: block; ● displaying the links as block elements makes the whole link area clickable (not just the text), and it allows us to specify the width about.me/babon
  • 7. CSS Navigation Bar width: 60px; ● since block elements take up the full width available, they cannot float next to each other. We specify the width of the links to 60px. about.me/babon
  • 8. CSS Image Gallery Use jQuery instead to handle image galleries. See jQuery jAM Tutorials about.me/babon
  • 9. CSS Image Opacity IE9, Firefox, Chrome, Opera, and Safari use the property opacity for transparency. ● takes a value from 0.0 - 1.0. A lower value makes the element more transparent. about.me/babon
  • 10. CSS Image Opacity IE8 and earlier use filter:alpha(opacity=x). ● the x can take a value from 0 - 100. A lower value makes the element more transparent. opacity.html about.me/babon
  • 11. CSS Image Sprite Use one single image to capture all navigation states. ● no loading delay when a user hovers over the image. image | sprites.html Apple Style CSS Sprite Menu about.me/babon