Cascading style sheets (CSS) is a style sheet language used to describe the look and formatting of a document written in markup language. It is most commonly applied to style web sites in HTML and XHTML. It enables separation of document content from presentation elements like layout, colors, and fonts.
Tips when creating a CSS layout
The most difficult thing in creating a CSS layout is getting it right. First, you must clear out the default padding and margin settings before you start. To center a layout, use a container div to contain all your content. Work from the top down by starting from the topmost elements in your design. Document what you are doing in case someday it needs debugging. Making comments inside your CSS file will help explain why you are doing things in a specific way. Choose a browser on which you are going to build your CSS and test from the start.
What to avoid when doing a CSS layout
A common mistake in making CSS layouts is browser incompatibility. This can be avoided by testing it from the start. You should also account for smaller browser resolutions. Your viewers may have a wide range of resolution. Avoid thinking that everyone else has the same sized monitor as you do. Mistakes such as not validating HTML, not considering frameworks, or not utilizing generic classes should be avoided. Also, using mammoth background images should be avoided.
Before creating a CSS layout, you should make sure to check for details like browser compatibility and to document your work. It would be time consuming to start all over again if every step is not well thought of.
Cascading Style Sheets Comments