Core CSS

Core CSS

4.11 - 1251 ratings - Source

Preface Welcome to the second edition of Core CSS. When the initial edition came out in 2000, while CSS had been around for a few years, it was largely underutilized on the Web. And there was a good reason for this: browser support for CSS properties was, to put it kindly, qspotty.q In the past few years things have changed substantially: the Mozilla project pushed for a standards-compliant rendering enginea€”including CSSa€”that has since been incorporated into the most recent versions of Netscape Navigator; and Internet Explorer 5.0 and later 6.0 made real advances in supporting CSS properties. As older, non-CSS-compliant browsers fade into the background, Web design has advanced accordingly and is beginning to take full advantage of the formatting possibilities that CSS opens up for both eye-popping and better functioning Web sites. While the browser manufacturers have been playing qcatch-upq and have largely (with some notable exceptions) instituted the CSS1 and CSS2 standards devised by the World Wide Web Consortium (W3C), the W3C has not stood still. While still in draft status, the various modules that will one day comprise the CSS3 specification are well on the way towards providing a comprehensive set of tools for Web authors seeking to format just about anything and everything you can think of that has to do with a Web page. While none of these CSS3 modules have been finalizeda€”and things may still change substantiallya€”many of the new directions that are being charted by the W3C in this area are covered in this book as a qheads upq as to what future Web developers can come to expect. One of the original reasons behind the creation of CSS was to prevent competing browsers developers from the runaway development of new HTML tags that only worked in their particular browser. This has seemingly not stopped the temptation by browser manufacturers to continue to qpush the envelope, q and in particular, recent versions of Microsoft's Internet Explorer have included a number of browser-specific CSS properties. These are covered in the various sections of the book, both out of a sense of completeness as well as wanting to provide readers who may be working in a qclosed-shopq environment (i.e., where they know that their clients are all using this browser) with information they can genuinely use. As a member of the W3C, Microsoft is also helping to chart the progress of the future CSS development, and many as yet browser-specific CSS properties may not be so in the future. When I am asked why I write computer books, I usually respond that I write books I wished already existed that I could use daily in my work. A number of books have appeared since the first edition of Core CSS came out, but none of them have been as comprehensivea€”especially when it came to covering CSS2 or Internet Explorer propertiesa€”as I would have liked. The majority of the code in the first book has been completely re-written for this edition, and dozens more examples better show what particular CSS properties can do and how they worka€”or do not worka€”in modern browsers. Who You Are You are a Web author who is looking to expand the capabilities of your Web pages. You know that CSS opens the doors to a wide range of possibilities, but want to learn more about how to make the most of it. Or perhaps you know that CSS will solve some of your most pernicious Web formatting problems, but shy away from using it because you have heard that it can produce varying results when viewed under different browsers or under different operating systems. Maybe you are looking for a single source that tells you what you need to know about a property at a glance, instead of having to traverse a dozen Web sites to get the same information. If you fit any of these circumstances, then this book is for you. This book takes a practical, pragmatic look at the current state of affairs regarding CSS and guides the reader through how CSS works. This book provides the information Web authors need in order to understand not only how CSS should work, but also how it actually works in current major browsers. It does not confine itself only to one operating system, but takes a look at how CSS works under browsers working under multiple operating systems. With this knowledge, Web authors will know which CSS properties are qsafeq for use, and which to avoid. More than that though, this book also provides information as to the future of CSS with an in-depth look at what will likely prove to be the foundation of the future CSS3 specification. You do not have to be an expert at understanding how Web pages work, but the book does assume you have a basic understanding of both HTML and the Web. The book assumes no prior knowledge of CSS. It will not only serve those Web authors who are just starting out using CSS, but also act as a handy reference for those occasions when you need to look up how a particular CSS property works. How This Book Is Organized The first edition of this book separated CSS1 and CSS2 properties. Now that much of CSS2 has been adopted within the major browsers, it no longer made sense to keep things separate. This has been extended further to include draft CSS3 properties into the (sometimes rough) families of properties to which they belong. While these properties are not currently in usea€”and some of them may not end up looking the same as they do in this book when they are finally releaseda€”they are important as an indicator of the way CSS development is progressing, so that forwardlooking Web authors can get a heads up. The CSS3 properties outlined here are my qbest guessesq based on my own Web-authoring experience. In some cases there are wholly separate chapters devoted to Internet Explorer-only CSS properties, but many of them fall into already-defined families of properties and are included in those chapters. In addition to all of the chapters in this book are some appendices designed to provide the Web author with quick reference material to have on hand when writing CSS code. Chapter 1 (qThe Birth of CSSq) explores how CSS in its current form came to be. The following two chapters (Chapter 2, q(X)HTML and Its Relationship to CSSq and Chapter 3, qBrowser Adoption of CSSq) provide information on how CSS can be accessed within Web page code, and how the major browser manufacturers have increasingly adopted CSS within their browsers. Chapter 4 (qImplementation of Basic CSS Conceptsq) looks at how some of the basic concepts behind CSSa€”such as inheritance, grouping CSS code and cascading rulesa€”are implemented in the major browsers. Chapters 5 and 6 (qThe Cascadeq and qCSS Units, q respectively) extend this concept further by looking at how the qCq of qCSSq works, and explains the many different fundamental units of measure that can be used in conjunction with certain CSS properties. Chapter 7 (qPseudo-Classes and Pseudo-Elementsq) looks at how these CSS elements which allow for special or conditional types of formatting can be utilized. Chapter 8 (qMedia Types and Media Queriesq) introduces the concept of media types and examines how Web pages can be modified so that they can be displayed through such things as print or qtalking browsers.q Chapters 9 and 10 (qFont Propertiesq and qText Propertiesq) begin the qmeat and potatoesq part of the book for most readers, looking in detail at the properties used daily by an increasing number of Web authors. Chapter 11 (qText Property Extensionsq) is the first chapter devoted wholly to Internet Explorer-specific properties, most of which are aimed at formatting Web pages for an international audience. Chapter 12 (qBox Propertiesq) brings us back to the qmeat and potatoesq area of CSS formatting, explaining in detail the box set CSS properties, which can determine how a wide variety of Web elements such as headers, images and paragraphs can be enhanced. The topic of Chapter 13 (qColorq) used to be part of the background family of properties, but the draft CSS3 module has charted a new course for using color on the Web, all of which is looked at in this section. Background propertiesa€”including a number of draft CSS innovations in this areaa€”are covered in Chapter 14 (qBackground Propertiesq). Chapter 15 (qClassification Properties and Generated/Automatic Contentq) is the start of what for many readers will be the more esoteric uses to which CSS can be put to, and yet represents much of where the real rendering power behind CSS lies. This chapter looks at how its functions enable Web authors to control and enhance content that is automatically generated by the browser, including such things as the numbering and display of lists. Chapter 16 (qVisual Formatting and Detailed Visual Formattingq) represents the core of what is popularly known as the qCSS positioningq properties. Chapter 17 (qVisual Effectsq) looks primarily at properties designed to produce stunning effects using dynamic code. Chapter 18 (qPaged Mediaq) explores those properties related to crafting Web pages so that they can be printed (rather than displayed on a screen) in the precise way that a Web author desires. Chapter 19 (qTablesq) looks at the somewhat rag-tag collection of table-related formatting properties, but then rounds off the chapter by looking at ways of creating table-like formatting structures using only CSS. In addition to covering what is already possible to do with user-interface properties in Chapter 20 (qUser Interfaceq)a€”such as providing greater control over the display of such things as cursors and the outlines that surround buttons or text fields in forms that denote a qfocusq for user inputa€”it also includes an extensive preview as to how you can affect the functionality of Web pages when now-draft CSS3 properties become available. Mastering the properties covered in these sections guarantees that you will be at the forefront of CSS-based Web design. Chapter 21 (qAural Cascading Style Sheetsq) begins a section of the book covering either under-implemented CSS properties or those specific to working with a particular browser. This chapter explores a relatively new class of properties designed to enable the Web author to determine how a Web page could be spoken aloud by a browser with speech capabilitiesa€”sadly, this is poorly implemented in the major browsers. Chapter 22 (qRubyq) looks at the properties used in formatting a particular type of Chinese text layout; these properties are specific to Internet Explorer but are now being actively considered by the W3C for inclusion in the future CSS3 specification. Columnar layout properties, based in part on some old browser-specific HTML tags in Netscape Navigator, are explored in Chapter 23 (qMulti-Column Layoutq). Chapter 24 (qScrollbarsq) briefly looks at some properties designed to change the appearance of scrollbars specific to recent versions of Internet Explorer. The final chapter (Chapter 25 qFilters and Transitionsq) is a sizable one devoted to Internet Explorer's CSS-based way of adding some interesting and often dynamic visual effects. Appendix A is a CSS compatibility chart, looking at all of the qSafe, q qUnsafeq and qPartialq-ly implemented CSS1 and CSS2 properties for various versions of the browsers Web authors are likely to run into. Appendix B provides an alphabetical listing of all CSS1, CSS2 and Internet Explorer CSS properties (minus the admittedly oddball filter and transition properties) as a quick reference. Appendix C looks at the CSS3 Mobile Profile and contains properties that are expected to be implemented in scaled-down browsers intended for use while qon the go.qIt should be noted that despite being unable to display a smooth progression of font values, all of the major browsers are considered in ... and smaller relative name values associated with font-size, bolder is supposed to make the selected text heavier than the default, ... Listing 9.10 Media Types Example alt;htmlagt; alt;headagt; alt;titleagt;font-weight Example 2alt;/titleagt; alt;styleagt; body {font-weight: 600; font-size: 45px}anbsp;...

Title:Core CSS
Author:Keith Schengili-Roberts
Publisher:Prentice Hall Professional - 2004


You Must CONTINUE and create a free account to access unlimited downloads & streaming