SlideShare a Scribd company logo
By: Vijayta Panchal Vinayak Solutions
Introduction Cascading Style Sheets (CSS)  are a collection of formatting rules that control the appearance of content in a web page. They are very useful for maintaining a web site since its appearance (controlled by properties of HTML tags) can be managed from just one file.  CSS Styles  also enhance your site's look, accessibility and reduces file size. Another main advantage is  reusability  - instead of defining the properties of fonts, backgrounds, borders, bullets, uniform tags, etc. each time you use them you can just assign the corresponding css style in the  class property . You can store CSS styles directly in each document or, for more control and flexibility, in an external style sheet. Vinayak Solutions
Box Model What is the CSS Box Model: The CSS box model describes the boxes that are formed around elements of content in a Web page. Every element in a Web page is in a box or is a box, even if it's an image of a circle. The boxes on Web pages are constrained by rules defined by the box model.  Vinayak Solutions
The CSS box model is made up of four parts:  margin  border  padding  content  Vinayak Solutions
The  margin  is the outermost edge of the box. It is transparent and manifests as space between the element and others on the page. Margins can collapse into one another, so that the bottom margin of one element overlaps with the top margin of the element below it. The  border  is the next thing surrounding the box. Borders can be colored or transparent. If the border is set to 0 it effectively disappears and the border edge is the same as the padding edge. The  padding  is the space between the content and the border. Padding is the same color as the background color for the box. If the padding is set to 0, the padding border is the same as the content border. The  content  is what most people think of as the element. This is the text or image or whatever is displayed inside the box. Vinayak Solutions Continue…
Box Model Issues The problem with the CSS box model is that not all Web browsers implement it the same way. In a nutshell, according to the W3C, width and height properties define the width and height of the content of the box. Items like padding, border, and margin surround that width and height.  Some versions of Internet Explorer instead define the width and height as the width and height of the entire element, including padding, and border.  If you want your designs to look the same in all browsers, you have to employ tricks and sometimes hacks to get IE to work correctly.  Vinayak Solutions
Box Model Issues Vinayak Solutions
Styling List (CSS navigation) HTML Code <div id=”navigation”> <ul>   <li><a href=“home”>Home</a></li> <li><a href=“News”>News</a></li>  <li><a href=“how”>How to Work</a></li>  <li><a href=“about”>Aout Us</a></li>  </ul> </div> Vinayak Solutions CSS Code #navigation ul { margin-left:0; } #navigation ul li { display:inline; list-type-style:none; margin:0; text-align:left; } #navigation ul li a #home { background: url(”images/btn_home.png”) no-repeat scroll left center; height:28px; width:70px; float:left; text-indent:-2000px; } #navigation ul li a:hover #home { background: url(”images/btn_home.png”) no-repeat scroll right center; height:28px; width:70px; float:left; text-indent:-2000px; }
Vinayak Solutions Output is
CSS button You can make one of those orange XML or RSS buttons or icons without using an image with CSS. Here's how:   CSS:  .feed { border:1px solid; border-color:#FC9 #630 #330 #F96;  padding:0 3px; font: bold 10px verdana , sans-serif ;  color:#FFF;background:#F60;text-decoration:none; margin:4px; } HTML: <a href=&quot;/rss/&quot; class=&quot;feed&quot;>FEED</a> Vinayak Solutions
Rounded corner without images Thought CSS3 we can have rounded corner  box without using a single image. Vinayak Solutions
Vinayak Solutions <html> <head>   <style>   #container p{background:red; padding:none; margin:0; width:100px} .rtop, .rbottom{display:block} .rtop *, .rbottom *{display: block; height: 1px; overflow: hidden; } .r1{margin: 0 5px; background:#999;} .r2{margin: 0 3px; background:#999;} .r3{margin: 0 2px; background:#999;} .r4{margin: 0 1px; height: 2px; background:#999;}   </style> </head> <body> <div id=&quot;container&quot;> <b class=&quot;rtop&quot;> <b class=&quot;r1&quot;></b> <b class=&quot;r2&quot;></b> <b class=&quot;r3&quot;></b> <b class=&quot;r4&quot;></b> </b> <p>Your Test Goes Here.</p> <b class=&quot;rbottom&quot;> <b class=&quot;r4&quot;></b> <b class=&quot;r3&quot;></b> <b class=&quot;r2&quot;></b> <b class=&quot;r1&quot;></b> </b> </div> </body> </html>
Working with divs The <div> tag was designed specifically to take over from tables as a layout tool. It is a block-level DIVsion element that can hold whatever you need inside it. You can have  blocks  of text in divs and then put them together in a layout. You have immense freedom, with the ability to add these blocks, or layers, on top of each other. div#navigation  {width: 200px; background: gray; padding: 10px; } Vinayak Solutions
Float  Since divisions are block-level (i.e. they default to 100% of the available screen width and add line breaks between each other), they will all just stack up underneath one another unless you position them in some way. The simplest way to do this is to use the CSS  float  property, the backbone of most CSS layouts. You can float any element left or right, and it will align itself over to the side of whatever element it is contained within. With these floating elements you can mimic a table structure, and have your page in a traditional layout without all the drawbacks of tables. But CSS wasn't content to merely emulate the layout mechanisms of the past, now you can control the position of elements on the page down to the pixel. Vinayak Solutions
Clear Image and text elements that appear in another element are called floating elements. The clear property sets the sides of an element where other floating elements are not allowed. Values are Left Right none Vinayak Solutions
Tableless designs DIVs can be an alternate to  <table> DIVs are a container like a table cell CSS can position the DIV <div id=&quot;article&quot;>xxx</div> #article{ width:250px; padding:5px; float:right;}  Example of flexible tableless Design Vinayak Solutions
CSS Hacks The main problem with using CSS has been a lack of browser support. The problem is that sometimes browsers can interpret CSS commands in different ways. A hack is a method of exploiting the way a web browser processes ( parses ) CSS instructions ( rules ), to control the styles a webpage receives (and in turn, the design of the page). ‘Control’ includes the ability to hide or change rules based on the browser type and/or version. Vinayak Solutions
Some Important hacks IE 6 and below  * html {}  IE 7 and below  *:first-child+html {} * html {}  IE 7 only  *:first-child+html {}  IE 7 and modern browsers only  html>body {} Modern browsers only (not IE 7)  html>/**/body {}  Recent Opera versions 9 and below  html:first-child {} Vinayak Solutions Continue…
!important Normally in CSS whichever rule is specified last takes precedence. However if you  use !important after a command then this CSS command will take precedence  regardless of what appears after it. This is true for all browsers except IE. An example of this would be: margin-top: 3.5em !important;  margin-top: 2em  So, the top margin will be set to 3.5em for all browsers except IE, which will have a top margin of 2em. This can sometimes come in useful, especially when using relative margins (such as in this example) as these can display slightly differently between IE and other browsers. Vinayak Solutions
CSS box model hack The box model hack is used to fix a rendering problem in pre-IE 6 browsers, where by the border and padding are  included  in the width of an element, as opposed to  added on . For example, when specifying the dimensions of a container you might use the following CSS rule: Vinayak Solutions #box { width: 150px; } #box div { border: 5px; padding: 20px; } #box { width: 100px; border: 5px; padding: 20px; } Code with Hack Regular  Code
@import &quot;non-ie.css&quot; all; Internet Explorer 7 and below don't support media selectors on @import rules, instead ignoring the entire rule when they are present. Therefore, you can create an entire stylesheet for non-IE browsers and import it into your main stylesheet by adding @import &quot;non-ie.css&quot; all;. Future versions of Internet Explorer may support the @import rule correctly. @import &quot; stylesheet.css &quot; all; Vinayak Solutions
Grouping styles You can give the same properties to a number of selectors without having to repeat them by separating the selectors by  commas . It is a useful thing for reducing file size. Example Vinayak Solutions h2  {  color: red; } .thisOtherClass { color: red;  } .yetAnotherClass  { color: red; } h2, .thisOtherClass, .yetAnotherClass  { color: red;  } Normal CSS Grouped CSS h1, h2, h3, h4, h5, h6  { color: blue; }
Nested Styles If the CSS is structured well, there shouldn't be a need to use many class or ID selectors. This is because you can specify properties to selectors  within  other selectors. Vinayak Solutions #top  { background-color: #ccc; padding: 1em } # top h1 { color: #ff0; }  # top p  { color: red; font-weight: bold; }
Conditional CSS a[href $='.pdf'] {     padding-right: 18px;    background: transparent url(icon_pdf.gif) no-repeat center right; } This would attach a pdf icon to the right of any hyperlink who's URL ended in '.pdf' like this. This was pretty exciting and heady stuff. It meant I could show the file type visually with that application's icon just by including a few lines in my master css file. I didn't have to worry about it at all in my html, css would add the icon for me automatically. Vinayak Solutions
Another Example span[id ^='google'] {     background-color: green; } Any span which has an id which starts with 'google' will be assigned a green background. More Examples Vinayak Solutions
Conditional CSS .ie .example { background-color: yellow } .gecko .example { background-color: gray } .opera .example { background-color: green } .konqueror .example { background-color: blue } .webkit .example { background-color: black } .example { width: 100px; height: 100px; background-color: brown; } Vinayak Solutions
Vinayak Solutions Continued…
Validation Validate your HTML validator.w3.org  Validate your CSS jigsaw.w3.org/css-validator/   Check for web accessibility bobby.watchfire.com Vinayak Solutions
Overview of XHTML “ The Extensible HyperText Markup Language (XHTML™) is a family of current and future document types and modules that reproduce, subset, and extend HTML, reformulated in XML. XHTML Family document types are all XML-based, and ultimately are designed to work in conjunction with XML-based user agents. XHTML is the successor of HTML, and a series of specifications has been developed for XHTML.”  Vinayak Solutions
How do I convert to XHTML?” Declare the  DOCTYPE Tag and attributes in lower case Attributes must have quoted values  All tags must have an end tag  ( <br /> ) Nest tags correctly  Validate the page  (http://validator.w3.org) Vinayak Solutions
Benefits to XHTML More Accessible Eliminates silly mistakes in code Renders more accurately in browsers Backward AND forward compatible First step toward Web Standards Vinayak Solutions
Vinayak Solutions

More Related Content

ODP
Cascading Style Sheets - Part 02
PPT
Html Expression Web
PDF
Introduction to HTML and CSS
PDF
HTML/CSS Crash Course (april 4 2017)
PDF
Css introduction
PDF
HTML & CSS Masterclass
Cascading Style Sheets - Part 02
Html Expression Web
Introduction to HTML and CSS
HTML/CSS Crash Course (april 4 2017)
Css introduction
HTML & CSS Masterclass

What's hot (19)

PDF
Slicing the web
PPTX
Html & CSS
PDF
CSS Refresher
PDF
CSS For Backend Developers
PPTX
Css intro
PDF
6 Steps to Make Your CSS Code More Maintainable
PDF
Styling Your Web Pages with Cascading Style Sheets / EDU course / University ...
PPTX
Introduction to HTML and CSS
PDF
Intro to HTML & CSS
PPTX
Div Tag Tutorial
PDF
An Intro to HTML & CSS
PPTX
Visualforce css developer guide(by forcetree.com)
PPT
CSS Best practices
PDF
Modular HTML, CSS, & JS Workshop
PPTX
Customizing the Appearance and HTML Output of Visualforce Pages
PPTX
Css Basics
PPTX
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Slicing the web
Html & CSS
CSS Refresher
CSS For Backend Developers
Css intro
6 Steps to Make Your CSS Code More Maintainable
Styling Your Web Pages with Cascading Style Sheets / EDU course / University ...
Introduction to HTML and CSS
Intro to HTML & CSS
Div Tag Tutorial
An Intro to HTML & CSS
Visualforce css developer guide(by forcetree.com)
CSS Best practices
Modular HTML, CSS, & JS Workshop
Customizing the Appearance and HTML Output of Visualforce Pages
Css Basics
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Ad

Similar to Advance Css 1194323118268797 5 (20)

PPT
Using a CSS Framework
PPT
CSS 101
PDF
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
PPT
CSS Methodology
PPT
PPT
Basics Of Css And Some Common Mistakes
PPT
Making Your Site Look Great in IE7
PPT
Web Designing Bugs - Fixes By Nyros Developer
ODP
Creating Web Sites with HTML and CSS
PDF
Organize Your Website With Advanced CSS Tricks
KEY
Slow kinda sucks
PDF
Structuring your CSS for maintainability: rules and guile lines to write CSS
PDF
Pfnp slides
PPTX
Lecture-7.pptx
PPT
Even faster web sites presentation 3
PDF
The CSS Handbook
PDF
The Future State of Layout
PPT
Web design-workflow
Using a CSS Framework
CSS 101
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
CSS Methodology
Basics Of Css And Some Common Mistakes
Making Your Site Look Great in IE7
Web Designing Bugs - Fixes By Nyros Developer
Creating Web Sites with HTML and CSS
Organize Your Website With Advanced CSS Tricks
Slow kinda sucks
Structuring your CSS for maintainability: rules and guile lines to write CSS
Pfnp slides
Lecture-7.pptx
Even faster web sites presentation 3
The CSS Handbook
The Future State of Layout
Web design-workflow
Ad

Recently uploaded (20)

PPTX
Fundamental Principles of Visual Graphic Design.pptx
PDF
Emailing DDDX-MBCaEiB.pdf DDD_Europe_2022_Intro_to_Context_Mapping_pdf-165590...
PPTX
artificialintelligencedata driven analytics23.pptx
PDF
Quality Control Management for RMG, Level- 4, Certificate
PPTX
ANATOMY OF ANTERIOR CHAMBER ANGLE AND GONIOSCOPY.pptx
PPT
UNIT I- Yarn, types, explanation, process
PPTX
12. Community Pharmacy and How to organize it
DOCX
actividad 20% informatica microsoft project
PPTX
Wisp Textiles: Where Comfort Meets Everyday Style
PPTX
Complete Guide to Microsoft PowerPoint 2019 – Features, Tools, and Tips"
PDF
GREEN BUILDING MATERIALS FOR SUISTAINABLE ARCHITECTURE AND BUILDING STUDY
PDF
Benefits_of_Cast_Aluminium_Doors_Presentation.pdf
PDF
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
PPT
Package Design Design Kit 20100009 PWM IC by Bee Technologies
PPTX
areprosthodontics and orthodonticsa text.pptx
PPTX
building Planning Overview for step wise design.pptx
PPTX
HPE Aruba-master-icon-library_052722.pptx
PDF
Design Thinking - Module 1 - Introduction To Design Thinking - Dr. Rohan Dasg...
PPTX
AD Bungalow Case studies Sem 2.pptxvwewev
PDF
Trusted Executive Protection Services in Ontario — Discreet & Professional.pdf
Fundamental Principles of Visual Graphic Design.pptx
Emailing DDDX-MBCaEiB.pdf DDD_Europe_2022_Intro_to_Context_Mapping_pdf-165590...
artificialintelligencedata driven analytics23.pptx
Quality Control Management for RMG, Level- 4, Certificate
ANATOMY OF ANTERIOR CHAMBER ANGLE AND GONIOSCOPY.pptx
UNIT I- Yarn, types, explanation, process
12. Community Pharmacy and How to organize it
actividad 20% informatica microsoft project
Wisp Textiles: Where Comfort Meets Everyday Style
Complete Guide to Microsoft PowerPoint 2019 – Features, Tools, and Tips"
GREEN BUILDING MATERIALS FOR SUISTAINABLE ARCHITECTURE AND BUILDING STUDY
Benefits_of_Cast_Aluminium_Doors_Presentation.pdf
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
Package Design Design Kit 20100009 PWM IC by Bee Technologies
areprosthodontics and orthodonticsa text.pptx
building Planning Overview for step wise design.pptx
HPE Aruba-master-icon-library_052722.pptx
Design Thinking - Module 1 - Introduction To Design Thinking - Dr. Rohan Dasg...
AD Bungalow Case studies Sem 2.pptxvwewev
Trusted Executive Protection Services in Ontario — Discreet & Professional.pdf

Advance Css 1194323118268797 5

  • 1. By: Vijayta Panchal Vinayak Solutions
  • 2. Introduction Cascading Style Sheets (CSS) are a collection of formatting rules that control the appearance of content in a web page. They are very useful for maintaining a web site since its appearance (controlled by properties of HTML tags) can be managed from just one file. CSS Styles also enhance your site's look, accessibility and reduces file size. Another main advantage is reusability - instead of defining the properties of fonts, backgrounds, borders, bullets, uniform tags, etc. each time you use them you can just assign the corresponding css style in the class property . You can store CSS styles directly in each document or, for more control and flexibility, in an external style sheet. Vinayak Solutions
  • 3. Box Model What is the CSS Box Model: The CSS box model describes the boxes that are formed around elements of content in a Web page. Every element in a Web page is in a box or is a box, even if it's an image of a circle. The boxes on Web pages are constrained by rules defined by the box model. Vinayak Solutions
  • 4. The CSS box model is made up of four parts: margin border padding content Vinayak Solutions
  • 5. The margin is the outermost edge of the box. It is transparent and manifests as space between the element and others on the page. Margins can collapse into one another, so that the bottom margin of one element overlaps with the top margin of the element below it. The border is the next thing surrounding the box. Borders can be colored or transparent. If the border is set to 0 it effectively disappears and the border edge is the same as the padding edge. The padding is the space between the content and the border. Padding is the same color as the background color for the box. If the padding is set to 0, the padding border is the same as the content border. The content is what most people think of as the element. This is the text or image or whatever is displayed inside the box. Vinayak Solutions Continue…
  • 6. Box Model Issues The problem with the CSS box model is that not all Web browsers implement it the same way. In a nutshell, according to the W3C, width and height properties define the width and height of the content of the box. Items like padding, border, and margin surround that width and height. Some versions of Internet Explorer instead define the width and height as the width and height of the entire element, including padding, and border. If you want your designs to look the same in all browsers, you have to employ tricks and sometimes hacks to get IE to work correctly. Vinayak Solutions
  • 7. Box Model Issues Vinayak Solutions
  • 8. Styling List (CSS navigation) HTML Code <div id=”navigation”> <ul> <li><a href=“home”>Home</a></li> <li><a href=“News”>News</a></li> <li><a href=“how”>How to Work</a></li> <li><a href=“about”>Aout Us</a></li> </ul> </div> Vinayak Solutions CSS Code #navigation ul { margin-left:0; } #navigation ul li { display:inline; list-type-style:none; margin:0; text-align:left; } #navigation ul li a #home { background: url(”images/btn_home.png”) no-repeat scroll left center; height:28px; width:70px; float:left; text-indent:-2000px; } #navigation ul li a:hover #home { background: url(”images/btn_home.png”) no-repeat scroll right center; height:28px; width:70px; float:left; text-indent:-2000px; }
  • 10. CSS button You can make one of those orange XML or RSS buttons or icons without using an image with CSS. Here's how: CSS: .feed { border:1px solid; border-color:#FC9 #630 #330 #F96; padding:0 3px; font: bold 10px verdana , sans-serif ; color:#FFF;background:#F60;text-decoration:none; margin:4px; } HTML: <a href=&quot;/rss/&quot; class=&quot;feed&quot;>FEED</a> Vinayak Solutions
  • 11. Rounded corner without images Thought CSS3 we can have rounded corner box without using a single image. Vinayak Solutions
  • 12. Vinayak Solutions <html> <head> <style> #container p{background:red; padding:none; margin:0; width:100px} .rtop, .rbottom{display:block} .rtop *, .rbottom *{display: block; height: 1px; overflow: hidden; } .r1{margin: 0 5px; background:#999;} .r2{margin: 0 3px; background:#999;} .r3{margin: 0 2px; background:#999;} .r4{margin: 0 1px; height: 2px; background:#999;} </style> </head> <body> <div id=&quot;container&quot;> <b class=&quot;rtop&quot;> <b class=&quot;r1&quot;></b> <b class=&quot;r2&quot;></b> <b class=&quot;r3&quot;></b> <b class=&quot;r4&quot;></b> </b> <p>Your Test Goes Here.</p> <b class=&quot;rbottom&quot;> <b class=&quot;r4&quot;></b> <b class=&quot;r3&quot;></b> <b class=&quot;r2&quot;></b> <b class=&quot;r1&quot;></b> </b> </div> </body> </html>
  • 13. Working with divs The <div> tag was designed specifically to take over from tables as a layout tool. It is a block-level DIVsion element that can hold whatever you need inside it. You can have blocks of text in divs and then put them together in a layout. You have immense freedom, with the ability to add these blocks, or layers, on top of each other. div#navigation {width: 200px; background: gray; padding: 10px; } Vinayak Solutions
  • 14. Float Since divisions are block-level (i.e. they default to 100% of the available screen width and add line breaks between each other), they will all just stack up underneath one another unless you position them in some way. The simplest way to do this is to use the CSS float property, the backbone of most CSS layouts. You can float any element left or right, and it will align itself over to the side of whatever element it is contained within. With these floating elements you can mimic a table structure, and have your page in a traditional layout without all the drawbacks of tables. But CSS wasn't content to merely emulate the layout mechanisms of the past, now you can control the position of elements on the page down to the pixel. Vinayak Solutions
  • 15. Clear Image and text elements that appear in another element are called floating elements. The clear property sets the sides of an element where other floating elements are not allowed. Values are Left Right none Vinayak Solutions
  • 16. Tableless designs DIVs can be an alternate to <table> DIVs are a container like a table cell CSS can position the DIV <div id=&quot;article&quot;>xxx</div> #article{ width:250px; padding:5px; float:right;} Example of flexible tableless Design Vinayak Solutions
  • 17. CSS Hacks The main problem with using CSS has been a lack of browser support. The problem is that sometimes browsers can interpret CSS commands in different ways. A hack is a method of exploiting the way a web browser processes ( parses ) CSS instructions ( rules ), to control the styles a webpage receives (and in turn, the design of the page). ‘Control’ includes the ability to hide or change rules based on the browser type and/or version. Vinayak Solutions
  • 18. Some Important hacks IE 6 and below * html {} IE 7 and below *:first-child+html {} * html {} IE 7 only *:first-child+html {} IE 7 and modern browsers only html>body {} Modern browsers only (not IE 7) html>/**/body {} Recent Opera versions 9 and below html:first-child {} Vinayak Solutions Continue…
  • 19. !important Normally in CSS whichever rule is specified last takes precedence. However if you use !important after a command then this CSS command will take precedence regardless of what appears after it. This is true for all browsers except IE. An example of this would be: margin-top: 3.5em !important; margin-top: 2em So, the top margin will be set to 3.5em for all browsers except IE, which will have a top margin of 2em. This can sometimes come in useful, especially when using relative margins (such as in this example) as these can display slightly differently between IE and other browsers. Vinayak Solutions
  • 20. CSS box model hack The box model hack is used to fix a rendering problem in pre-IE 6 browsers, where by the border and padding are included in the width of an element, as opposed to added on . For example, when specifying the dimensions of a container you might use the following CSS rule: Vinayak Solutions #box { width: 150px; } #box div { border: 5px; padding: 20px; } #box { width: 100px; border: 5px; padding: 20px; } Code with Hack Regular Code
  • 21. @import &quot;non-ie.css&quot; all; Internet Explorer 7 and below don't support media selectors on @import rules, instead ignoring the entire rule when they are present. Therefore, you can create an entire stylesheet for non-IE browsers and import it into your main stylesheet by adding @import &quot;non-ie.css&quot; all;. Future versions of Internet Explorer may support the @import rule correctly. @import &quot; stylesheet.css &quot; all; Vinayak Solutions
  • 22. Grouping styles You can give the same properties to a number of selectors without having to repeat them by separating the selectors by commas . It is a useful thing for reducing file size. Example Vinayak Solutions h2 { color: red; } .thisOtherClass { color: red; } .yetAnotherClass { color: red; } h2, .thisOtherClass, .yetAnotherClass { color: red; } Normal CSS Grouped CSS h1, h2, h3, h4, h5, h6 { color: blue; }
  • 23. Nested Styles If the CSS is structured well, there shouldn't be a need to use many class or ID selectors. This is because you can specify properties to selectors within other selectors. Vinayak Solutions #top { background-color: #ccc; padding: 1em } # top h1 { color: #ff0; } # top p { color: red; font-weight: bold; }
  • 24. Conditional CSS a[href $='.pdf'] {    padding-right: 18px;    background: transparent url(icon_pdf.gif) no-repeat center right; } This would attach a pdf icon to the right of any hyperlink who's URL ended in '.pdf' like this. This was pretty exciting and heady stuff. It meant I could show the file type visually with that application's icon just by including a few lines in my master css file. I didn't have to worry about it at all in my html, css would add the icon for me automatically. Vinayak Solutions
  • 25. Another Example span[id ^='google'] {    background-color: green; } Any span which has an id which starts with 'google' will be assigned a green background. More Examples Vinayak Solutions
  • 26. Conditional CSS .ie .example { background-color: yellow } .gecko .example { background-color: gray } .opera .example { background-color: green } .konqueror .example { background-color: blue } .webkit .example { background-color: black } .example { width: 100px; height: 100px; background-color: brown; } Vinayak Solutions
  • 28. Validation Validate your HTML validator.w3.org Validate your CSS jigsaw.w3.org/css-validator/ Check for web accessibility bobby.watchfire.com Vinayak Solutions
  • 29. Overview of XHTML “ The Extensible HyperText Markup Language (XHTML™) is a family of current and future document types and modules that reproduce, subset, and extend HTML, reformulated in XML. XHTML Family document types are all XML-based, and ultimately are designed to work in conjunction with XML-based user agents. XHTML is the successor of HTML, and a series of specifications has been developed for XHTML.” Vinayak Solutions
  • 30. How do I convert to XHTML?” Declare the DOCTYPE Tag and attributes in lower case Attributes must have quoted values All tags must have an end tag ( <br /> ) Nest tags correctly Validate the page (http://validator.w3.org) Vinayak Solutions
  • 31. Benefits to XHTML More Accessible Eliminates silly mistakes in code Renders more accurately in browsers Backward AND forward compatible First step toward Web Standards Vinayak Solutions