| You are here: | About>Computing & Technology>Web Design / HTML> About.com Web Design A to Z> Web Design Articles R-Z> Web Design/HTML Articles S> Safe CSS - Cascading Style Sheets For Most Browsers |
![]() | Web Design / HTML |
Safe CSS - Cascading Style Sheets For Most BrowsersCascading Style Sheet Properties that Work on Most BrowsersIf you want to get started with CSS, but you're afraid that your customers will have browsers that don't support advanced Cascading Style Sheet properties, you can use the properties in this list to be more confident that your pages will be viewable. These CSS properties cover most of the basic style sheet elements, from text and fonts to color and backgrounds. FontsChanging the look of fonts is one of the simplest things you can do with Cascading Style Sheets. And there are several CSS properties that work reliably across most CSS capable browsers. font-familyThis style property determines the family or font face of the selected text. You can define values such as generic font names like "serif" or specific font faces like "Arial".font-sizeDefining the font size allows you to specify exactly how large or small the fonts should be within your Web page.font-weightFont-weight indicates the darkness or boldness of the text. To be safe, you should only use the propertyfont-weight : bold;font-styleFont-style indicates the style of your text - generally this means italics.colorFinally, the color of the font on your Web pages is the most common thing to change. To be most compatible, you should use browser safe colors and use the hexadecimal codes, not the names.text-decorationThe text-decoration property is most often used to remove underlines from links:text-decoration : none; TextText layout on Web pages can be manipulated with CSS. This includes properties such as the alignment, decoration, and line height. line-heightLeading is important to designers, especially if you're used to print design. And with the line-height property, you can define this easily.text-alignAlign your text as centered, left or right aligned.text-indentYour text will be indented either an exact amount or a percentage of the page width. BackgroundsIt's even possible to change the background colors on your pages (or tables) or even provide a background image. background-colorDefine the color of the background. As with font colors, you should use browser safe colors and use the hexadecimal codes, not the names.background-imageUse a relative or absolute path URL to an image you'd like to have tiled in the background of your Web page. Using these style properties, you can be sure that your XHTML and HTML documents will display correctly no matter what browser your customers are using. |
Las Vegas on a BudgetFind a BargainHotel DealsCheap EatsFree AttractionsEntertainment for Less |
All Topics | Email Article | | | ![]() |
| Advertising Info | News & Events | Work at About | SiteMap | Reprints | Help | Our Story | Be a Guide |
| User Agreement | Ethics Policy | Patent Info. | Privacy Policy | ©2008 About, Inc., A part of The New York Times Company. All rights reserved. |


