Highlighted below are the most widely used CSS declarations.
These are used mostly because most of them are supported in all browsers, they are quickest and shortest to write and make most sense in terms of design of usable and accessible interfaces.
Once again, Pareto’s analysis exemplifies itself in a similar way to how it exemplified itself with HMTL (see Pareto analysis of HTML) which implies that CSS implementation is possibly more extensive than it needs to be for most web site types.
- :active
- :after
- :before
- :first-child
- :first-letter
- :first-line
- :focus
- :hover
- :lang
- :link
- :visited
- background
- background-attachment
- background-color
- background-image
- background-position
- background-repeat
- background-repeat
- border
- border-bottom
- border-bottom-color
- border-bottom-style
- border-bottom-width
- border-collapse
- border-color
- border-left
- border-left-color
- border-left-style
- border-left-width
- border-right
- border-right-color
- border-right-style
- border-right-width
- border-spacing
- border-style
- border-top
- border-top-color
- border-top-style
- border-top-width
- border-width
- bottom
- caption-side
- clip
- color
- counter-increment
- counter-reset
- cursor
- direction
- display
- empty-cells
- float
- font
- font-family
- font-size
- font-size-adjust
- font-stretch
- font-style
- font-variant
- font-weight
- left
- letter-spacing
- line-height
- list-style
- list-style-image
- list-style-position
- list-style-type
- margin
- margin-bottom
- margin-left
- margin-right
- margin-top
- max-height
- max-width
- min-height
- min-width
- outline
- outline-color
- outline-style
- outline-width
- overflow
- padding
- padding-bottom
- padding-left
- padding-right
- padding-top
- position
- right
- table-layout
- text-align
- text-decoration
- text-indent
- text-transform
- top
- visibility
- white-space
- word-spacing
- z-index
The use of above highlighted declarations is most common based on the projects I have worked on so far (small and large) and various analysis I have done on other web sites in the wild.
It does not mean that you are likely to use all of these declarations on all web sites.
It is also the case that some declarations are used for, essentially, wrong purposes. A great example is the use of line-height in order to position elements vertically, which, over time, can end up being counter-productive approach on larger web sites.
Nevertheless, line-height is a worth while declaration to utilise, for example, in order to make text easier to read on the screen as it is generally agreed that some extra spacing between the lines of text makes it easier to read off the screen.
Written by Jason Grant, BSc, MSc on 3rd April 2009
But, sometimes it doesn’t work well on old Internet Explorer and mobile browsers without a hacks.
About the contact form, I guess a little bit strange. The form is open, but user must have registered to comment.
dani on 7th April