SlideShare une entreprise Scribd logo
1  sur  6
Télécharger pour lire hors ligne
CSS Examples                                                                                    http://www.w3schools.com/Css/css_examples.asp




          HOME       HTML     CSS    XML    JAVASCRIPT      ASP     PHP    SQL     MORE...                               References




         CSS Basic
         CSS   HOME
         CSS   Introduction
         CSS   Syntax                 « Previous                                                                   Next Chapter
         CSS   Id & Class
         CSS   How To
                                      CSS Backgrounds
         CSS Styling                  Set the background color of a page
         Styling   Backgrounds        Set the background color of different elements
         Styling   Text               Set an image as the background of a page
         Styling   Fonts              Bad background image
         Styling   Links              How to repeat a background image only horizontally
         Styling   Lists              How to position a background image
         Styling   Tables             A fixed background image (this image will not scroll with the rest of the page)
                                      All the background properties in one declaration
         CSS Box Model                Advanced background example
         CSS   Box Model              Background properties explained
         CSS   Border
         CSS   Outline
         CSS   Margin                 CSS Text
         CSS   Padding
                                      Set the text color of different elements
         CSS Advanced                 Align the text
                                      Remove the line under links
         CSS   Grouping/Nesting
                                      Decorate the text
         CSS   Dimension
                                      Control the letters in a text
         CSS   Display
                                      Indent text
         CSS   Positioning
                                      Specify the space between characters
         CSS   Floating
                                      Specify the space between lines
         CSS   Align
                                      Set the text direction of an element
         CSS   Pseudo-class
                                      Increase the white space between words
         CSS   Pseudo-element
                                      Disable text wrapping inside an element
         CSS   Navigation Bar
                                      Vertical alignment of an image inside text
         CSS   Image Gallery
         CSS   Image Opacity          Text properties explained
         CSS   Image Sprites
         CSS   Media Types
         CSS   Attribute Selectors    CSS Fonts
         CSS   Don't
         CSS   Summary                Set the font of a text
                                      Set the size of the font
         CSS Examples                 Set the size of the font in px
         CSS Examples                 Set the size of the font in em
                                      Set the size of the font in percent and em
                                      Set the style of the font
         CSS Quiz
                                      Set the variant of the font
         CSS Quiz                     Set the boldness of the font
         CSS Exam                     All the font properties in one declaration

         CSS References               Font properties explained
         CSS   Reference
         CSS   Reference A to Z       CSS Links
         CSS   Reference Aural
         CSS   Web Safe Fonts         Add different colors to visited/unvisited links
         CSS   Units                  Use of text-decoration on links
         CSS   Colors                 Specify a background color for links
         CSS   Colorvalues            Add other styles to hyperlinks
         CSS   Colornames             Advanced - Create link boxes



1 of 6                                                                                                                     1/27/2010 1:49 PM
CSS Examples                                                            http://www.w3schools.com/Css/css_examples.asp



               Link properties explained


               CSS Lists

               All the different list item markers in lists
               Set an image as the list-item marker
               Set an image as the list-item marker - Crossbrowser solution
               All list properties in one declaration

               List properties explained


               CSS Tables

               Specify a black border for table, th, and td elements
               Use of border-collapse
               Specify the width and height of a table
               Set the horizontal alignment of content (text-align)
               Set the vertical alignment of content (vertical-align)
               Specify the padding for th and td elements
               Specify the color of the table borders
               Set the position of the table caption
               Create a fancy table

               Table properties explained


               CSS Box Model

               Specify an element with a total width of 250px
               Specify an element with a total width of 250px - Crossbrowser solution

               Box model explained


               CSS Border

               Set   the   width   of   the   four borders
               Set   the   width   of   the   top border
               Set   the   width   of   the   bottom border
               Set   the   width   of   the   left border
               Set   the   width   of   the   right border

               Set   the   style   of   the   four borders
               Set   the   style   of   the   top border
               Set   the   style   of   the   bottom border
               Set   the   style   of   the   left border
               Set   the   style   of   the   right border

               Set   the   color   of   the   four borders
               Set   the   color   of   the   top border
               Set   the   color   of   the   bottom border
               Set   the   color   of   the   left border
               Set   the   color   of   the   right border

               All the border properties in one declaration

               Set different borders on each side
               All the top border properties in one declaration
               All the bottom border properties in one declaration
               All the left border properties in one declaration
               All the right border properties in one declaration

               Border properties explained


               CSS Outline

               Draw a line around an element (outline)
               Set the style of an outline
               Set the color of an outline
               Set the width of an outline

               O     li                 i         l i   d


2 of 6                                                                                             1/27/2010 1:49 PM
CSS Examples                                                             http://www.w3schools.com/Css/css_examples.asp


               Outline properties explained


               CSS Margin

               Specify margins for an element
               The margin shorthand property
               Set the top margin of a text using a cm value
               Set the bottom margin of a text using a percent value
               Set the left margin of a text using a cm value

               Margin properties explained


               CSS Padding

               Set the left padding of an element
               Set the right padding of an element
               Set the top padding of an element
               Set the bottom padding of an element
               All the padding properties in one declaration

               Padding properties explained


               CSS Grouping and Nesting

               Group selectors
               Nested (descendant) selectors

               Grouping and nesting explained


               CSS Dimension

               Set   the   height of an image using a pixel value
               Set   the   height of an image using percent
               Set   the   width of an element using a pixel value
               Set   the   width of an element using percent
               Set   the   maximum height of an element
               Set   the   maximum width of an element using a pixel value
               Set   the   maximum width of an element using percent
               Set   the   minimum height of an element
               Set   the   minimum width of an element using a pixel value
               Set   the   minimum width of an element using percent

               Dimension properties explained


               CSS Display

               How   to    hide an element (visibility:hidden)
               How   to    not display an element (display:none)
               How   to    display an element as an inline element
               How   to    display an element as a block element
               How   to    make a table element collapse

               Display properties explained


               CSS Positioning

               Position an element relative to the browser window
               Position an element relative to its normal position
               Position an element with an absolute value
               Overlapping elements
               Set the shape of an element
               How to create a scroll bar when an element's content is too big to fit
               How to set the browser to automatically handle overflow
               Set the top edge of an image using a pixel value
               Set the bottom edge of an image using a pixel value
               Set the left edge of an image using a pixel value
               Set the right edge of an image using a pixel value
               Change the cursor

               Positioning properties explained


3 of 6                                                                                              1/27/2010 1:49 PM
CSS Examples                                                                 http://www.w3schools.com/Css/css_examples.asp

               Positioning properties explained


               CSS Floating

               A simple use of the float property
               An image with border and margins that floats to the right in a paragraph
               An image with a caption that floats to the right
               Let the first letter of a paragraph float to the left
               Create an image gallery with the float property
               Turn of float - with the clear property
               Creating a horizontal menu
               Creating a homepage without tables

               Float properties explained


               CSS Aligning Elements

               Center aligning with margin
               Left/Right aligning with position
               Left/Right aligning with position - Crossbrowser solution
               Left/Right aligning with float
               Left/Right aligning with float - Crossbrowser solution

               Align properties explained


               CSS Generated Content

               Insert the URL in parenthesis after each link with the content property
               Numbering sections and sub-sections with "Section 1", "1.1", "1.2", etc.
               Specify the quotation marks with the quotes property


               CSS Pseudo-classes

               Add different colors to a hyperlink
               Add other styles to hyperlinks
               Use of :focus
               :first-child - match the first p element
               :first-child - match the first i element in all p elements
               :first-child - Match all i elements in all first child p elements
               Use of :lang

               Pseudo-classes explained


               CSS Pseudo-elements

               Make the first letter special in a text
               Make the first line special in a text
               Make the first letter and first line special
               Use :before to insert some content before an element
               Use :after to insert some content after an element

               Pseudo-elements explained


               CSS Navigation Bars

               Fully styled vertical navigation bar
               Fully styled horizontal navigation bar

               Navigation bars explained


               CSS Image Gallery

               Image gallery

               Image gallery explained


               CSS Image Opacity

               Creating transparent images - mouseover effect


4 of 6                                                                                                  1/27/2010 1:49 PM
CSS Examples                                                                  http://www.w3schools.com/Css/css_examples.asp

               Creating transparent images mouseover effect
               Creating a transparent box with text on a background image

               Image opacity explained


               CSS Image Sprites

               An image sprite
               An image sprite - a navigation list
               An image sprite with hover effect

               Image sprites explained


               CSS Attribute Selectors

               Select   elements   with   a title attribute
               Select   elements   with   title=a specific value
               Select   elements   with   title=a specific value (even if the attribute has space-separated values)
               Select   elements   with   title=a specific value (even if the attribute has hyphen-separated values)

               Attribute selectors explained


               « Previous                                                                         Next Chapter




               The Creators of XMLSpy are Pleased to Announce

               The MOST WANTED features for Developers and
               IT Professionals in Version 2010

               Collect your handsome reward! Download a free trial and
               experience more than 70 of the Most Wanted features
               including:

                        JSON editing & conversion in XMLSpy
                        WSDL 2.0 editing in XMLSpy (adding to WSDL 1.1
                        support)
                        WSDL 2.0 data mapping in MapForce
                        Numerous data mapping enhancements in MapForce
                        Numerous stylesheet design enhancements in
                        StyleVision
                        XML Schema comparison in DiffDog
                        And much more!

               Fully functional 30-day free trial of the Altova MissionKit




5 of 6                                                                                                     1/27/2010 1:49 PM
CSS Examples                                                                              http://www.w3schools.com/Css/css_examples.asp




                                                                                                               HOME | TOP | P


               W3Schools is for training only. We do not warrant the correctness of its content. The risk from using it lies entir
                                While using this site, you agree to have read and accepted our terms of use and privacy policy
                                                  Copyright 1999-2010 by Refsnes Data. All Rights Reserved.




6 of 6                                                                                                                 1/27/2010 1:49 PM

Contenu connexe

Similaire à Css Examples (20)

Introduction 2 css
Introduction 2 cssIntroduction 2 css
Introduction 2 css
 
Css jon duckett - flashcards
Css   jon duckett - flashcardsCss   jon duckett - flashcards
Css jon duckett - flashcards
 
Css
CssCss
Css
 
Web Design Course: CSS lecture 3
Web Design Course: CSS lecture 3Web Design Course: CSS lecture 3
Web Design Course: CSS lecture 3
 
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
 
CSS
CSSCSS
CSS
 
Css Complete Notes
Css Complete NotesCss Complete Notes
Css Complete Notes
 
CSS properties.docx
CSS properties.docxCSS properties.docx
CSS properties.docx
 
Session 3
Session 3Session 3
Session 3
 
CSS - LinkedIn
CSS - LinkedInCSS - LinkedIn
CSS - LinkedIn
 
Css
CssCss
Css
 
Css
CssCss
Css
 
Journey To The Front End World - Part2 - The Cosmetic
Journey To The Front End World - Part2 - The  CosmeticJourney To The Front End World - Part2 - The  Cosmetic
Journey To The Front End World - Part2 - The Cosmetic
 
CSS Presentation Notes.pptx
CSS Presentation Notes.pptxCSS Presentation Notes.pptx
CSS Presentation Notes.pptx
 
05. session 05 introducing css
05. session 05   introducing css05. session 05   introducing css
05. session 05 introducing css
 
2_css.pptx
2_css.pptx2_css.pptx
2_css.pptx
 
2_css.pptx
2_css.pptx2_css.pptx
2_css.pptx
 
html-css
html-csshtml-css
html-css
 
Web day01 MOL.pdf
Web day01 MOL.pdfWeb day01 MOL.pdf
Web day01 MOL.pdf
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
 

Dernier

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 

Dernier (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Css Examples

  • 1. CSS Examples http://www.w3schools.com/Css/css_examples.asp HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE... References CSS Basic CSS HOME CSS Introduction CSS Syntax « Previous Next Chapter CSS Id & Class CSS How To CSS Backgrounds CSS Styling Set the background color of a page Styling Backgrounds Set the background color of different elements Styling Text Set an image as the background of a page Styling Fonts Bad background image Styling Links How to repeat a background image only horizontally Styling Lists How to position a background image Styling Tables A fixed background image (this image will not scroll with the rest of the page) All the background properties in one declaration CSS Box Model Advanced background example CSS Box Model Background properties explained CSS Border CSS Outline CSS Margin CSS Text CSS Padding Set the text color of different elements CSS Advanced Align the text Remove the line under links CSS Grouping/Nesting Decorate the text CSS Dimension Control the letters in a text CSS Display Indent text CSS Positioning Specify the space between characters CSS Floating Specify the space between lines CSS Align Set the text direction of an element CSS Pseudo-class Increase the white space between words CSS Pseudo-element Disable text wrapping inside an element CSS Navigation Bar Vertical alignment of an image inside text CSS Image Gallery CSS Image Opacity Text properties explained CSS Image Sprites CSS Media Types CSS Attribute Selectors CSS Fonts CSS Don't CSS Summary Set the font of a text Set the size of the font CSS Examples Set the size of the font in px CSS Examples Set the size of the font in em Set the size of the font in percent and em Set the style of the font CSS Quiz Set the variant of the font CSS Quiz Set the boldness of the font CSS Exam All the font properties in one declaration CSS References Font properties explained CSS Reference CSS Reference A to Z CSS Links CSS Reference Aural CSS Web Safe Fonts Add different colors to visited/unvisited links CSS Units Use of text-decoration on links CSS Colors Specify a background color for links CSS Colorvalues Add other styles to hyperlinks CSS Colornames Advanced - Create link boxes 1 of 6 1/27/2010 1:49 PM
  • 2. CSS Examples http://www.w3schools.com/Css/css_examples.asp Link properties explained CSS Lists All the different list item markers in lists Set an image as the list-item marker Set an image as the list-item marker - Crossbrowser solution All list properties in one declaration List properties explained CSS Tables Specify a black border for table, th, and td elements Use of border-collapse Specify the width and height of a table Set the horizontal alignment of content (text-align) Set the vertical alignment of content (vertical-align) Specify the padding for th and td elements Specify the color of the table borders Set the position of the table caption Create a fancy table Table properties explained CSS Box Model Specify an element with a total width of 250px Specify an element with a total width of 250px - Crossbrowser solution Box model explained CSS Border Set the width of the four borders Set the width of the top border Set the width of the bottom border Set the width of the left border Set the width of the right border Set the style of the four borders Set the style of the top border Set the style of the bottom border Set the style of the left border Set the style of the right border Set the color of the four borders Set the color of the top border Set the color of the bottom border Set the color of the left border Set the color of the right border All the border properties in one declaration Set different borders on each side All the top border properties in one declaration All the bottom border properties in one declaration All the left border properties in one declaration All the right border properties in one declaration Border properties explained CSS Outline Draw a line around an element (outline) Set the style of an outline Set the color of an outline Set the width of an outline O li i l i d 2 of 6 1/27/2010 1:49 PM
  • 3. CSS Examples http://www.w3schools.com/Css/css_examples.asp Outline properties explained CSS Margin Specify margins for an element The margin shorthand property Set the top margin of a text using a cm value Set the bottom margin of a text using a percent value Set the left margin of a text using a cm value Margin properties explained CSS Padding Set the left padding of an element Set the right padding of an element Set the top padding of an element Set the bottom padding of an element All the padding properties in one declaration Padding properties explained CSS Grouping and Nesting Group selectors Nested (descendant) selectors Grouping and nesting explained CSS Dimension Set the height of an image using a pixel value Set the height of an image using percent Set the width of an element using a pixel value Set the width of an element using percent Set the maximum height of an element Set the maximum width of an element using a pixel value Set the maximum width of an element using percent Set the minimum height of an element Set the minimum width of an element using a pixel value Set the minimum width of an element using percent Dimension properties explained CSS Display How to hide an element (visibility:hidden) How to not display an element (display:none) How to display an element as an inline element How to display an element as a block element How to make a table element collapse Display properties explained CSS Positioning Position an element relative to the browser window Position an element relative to its normal position Position an element with an absolute value Overlapping elements Set the shape of an element How to create a scroll bar when an element's content is too big to fit How to set the browser to automatically handle overflow Set the top edge of an image using a pixel value Set the bottom edge of an image using a pixel value Set the left edge of an image using a pixel value Set the right edge of an image using a pixel value Change the cursor Positioning properties explained 3 of 6 1/27/2010 1:49 PM
  • 4. CSS Examples http://www.w3schools.com/Css/css_examples.asp Positioning properties explained CSS Floating A simple use of the float property An image with border and margins that floats to the right in a paragraph An image with a caption that floats to the right Let the first letter of a paragraph float to the left Create an image gallery with the float property Turn of float - with the clear property Creating a horizontal menu Creating a homepage without tables Float properties explained CSS Aligning Elements Center aligning with margin Left/Right aligning with position Left/Right aligning with position - Crossbrowser solution Left/Right aligning with float Left/Right aligning with float - Crossbrowser solution Align properties explained CSS Generated Content Insert the URL in parenthesis after each link with the content property Numbering sections and sub-sections with "Section 1", "1.1", "1.2", etc. Specify the quotation marks with the quotes property CSS Pseudo-classes Add different colors to a hyperlink Add other styles to hyperlinks Use of :focus :first-child - match the first p element :first-child - match the first i element in all p elements :first-child - Match all i elements in all first child p elements Use of :lang Pseudo-classes explained CSS Pseudo-elements Make the first letter special in a text Make the first line special in a text Make the first letter and first line special Use :before to insert some content before an element Use :after to insert some content after an element Pseudo-elements explained CSS Navigation Bars Fully styled vertical navigation bar Fully styled horizontal navigation bar Navigation bars explained CSS Image Gallery Image gallery Image gallery explained CSS Image Opacity Creating transparent images - mouseover effect 4 of 6 1/27/2010 1:49 PM
  • 5. CSS Examples http://www.w3schools.com/Css/css_examples.asp Creating transparent images mouseover effect Creating a transparent box with text on a background image Image opacity explained CSS Image Sprites An image sprite An image sprite - a navigation list An image sprite with hover effect Image sprites explained CSS Attribute Selectors Select elements with a title attribute Select elements with title=a specific value Select elements with title=a specific value (even if the attribute has space-separated values) Select elements with title=a specific value (even if the attribute has hyphen-separated values) Attribute selectors explained « Previous Next Chapter The Creators of XMLSpy are Pleased to Announce The MOST WANTED features for Developers and IT Professionals in Version 2010 Collect your handsome reward! Download a free trial and experience more than 70 of the Most Wanted features including: JSON editing & conversion in XMLSpy WSDL 2.0 editing in XMLSpy (adding to WSDL 1.1 support) WSDL 2.0 data mapping in MapForce Numerous data mapping enhancements in MapForce Numerous stylesheet design enhancements in StyleVision XML Schema comparison in DiffDog And much more! Fully functional 30-day free trial of the Altova MissionKit 5 of 6 1/27/2010 1:49 PM
  • 6. CSS Examples http://www.w3schools.com/Css/css_examples.asp HOME | TOP | P W3Schools is for training only. We do not warrant the correctness of its content. The risk from using it lies entir While using this site, you agree to have read and accepted our terms of use and privacy policy Copyright 1999-2010 by Refsnes Data. All Rights Reserved. 6 of 6 1/27/2010 1:49 PM