CSS Tips
Category: CSS, CSS3 Tutorial | 748 views | Add a Comment |
-
Use
Reset.CssWhen it comes to rendering CSS styles, browsers like Firefox and Internet Explorer have different ways of handling them.
reset.cssresets all fundamental styles, so you starts with a real blank new stylesheets.Here are few commonly used
reset.cssframeworks - Yahoo Reset CSS, Eric Meyer’s CSS Reset, Tripoli -
Use Shorthand CSS
Shorthand CSS gives you a shorter way of writing your CSS codes, and most important of all - it makes the code clearner and easier to understand.
Instead of creating CSS like this
- .header {
- background-color: #fff;
- background-image: url(image.gif);
- background-repeat: no-repeat;
- background-position: top left;
- }
It can be short-handed into the following:
- .header {
- background: #fff url(image.gif) no-repeat top left
- }
More - Introduction to CSS Shorthand, Useful CSS shorthand properties
-
Understanding
ClassAndIDThese two selectors often confuse beginners. In CSS,
classis represented by a dot “.” whileidis a hash ‘#”. In a nutshellidis used on style that is unique and don’t repeat itself,classon the other side, can be re-use.More - Class vs. ID | When to use Class, ID | Applying Class and ID together
-
Power Of
<Li><li>a.k.a link list, is very useful when they are use correctly with<ol>or<ul>, particulary to style a navigation menu.More - Taming Lists, Amazing LI
-
Forget
<Table>, Try<Div>One of the greatest advantage of CSS is the use of
<div>to achieve total flexibility in terms of styling.<div>are unlike<table>,where contents are ‘locked’ within a<td>’s cell. It’s safe to say most<table>layouts are achievable with the use of<div>and proper styling, well maybe except massive tabular contents.More - Tables are dead, Tables Vs. CSS, CSS vs tables
-
CSS Debugging Tools
It’s always good to get instant preview of the layout while tweaking the CSS, it helps understanding and debugging CSS styles better. Here are some free CSS debugging tools you can install on your browser: FireFox Web Developer, DOM Inspector, Internet Explorer Developer Toolbar, andFirebug.
- Organizing Your CSS Files
- 100 CSS Examples and Tutorials
- 150 CSS Examples
- Top CSS Tips
- Introduction to CSS3
- Margins and Absolute Positioning
- Top reasons sites break in IE 7
- Write a Clean CSS
- How to design css sitemap Tree
- Top 10 CSS Tips




