CSS's "Top Skills"
Snook.Ca to all CSSer recently made some time to write CSS "top skills."
Font size use px
In his statement, CSS
Contrast the following two:
H2 (font-size: 18px; border: 1px solid blue; color: # 000; background-color: # FFF;)
H2 (
Font-size: 18px;
Border: 1px solid blue;
Color: # 000;
Background-color: # FFF;
)
The second did seem like format, but will not have any reading help. In his writing, the faster you can find the necessary parts.
I also wrote before the second similar manner, but gradually discovered as the article said, not much use. Also refreshing, and his party appear in the local paper also enables even smaller.
Writing this code block can write code to CSS more pages of time can be a problem in the shortest possible time to find where the problem lies. Like as follows:
# Content (float: left;)
# Content p) (…# Sidebar (float: left;)
# Sidebar p) (…# Footer (clear: both;)
# Sidebar p) (…
Browsers support only support for the latest browsers. That is to give up IE5 and IE5.5. As a result we can save a lot of time. IE6 is not for the use of Box Model Hack. If only popular browser, only a small Hack will be able to achieve the same effect.
I pay attention to a new home to the CSS NetEase, which was one! Hack important or not, but in the FF and IE inside show have yielded very good results. Rational use of CSS Hack can be avoided. Of course, debugging time a little more.
Contain the floating element
All the contents of containers should be designed and containers consistent. If it will be too large sliding to the wrong location. Negative margin adjusted to the use of containers, the same will lead to slip.
Understand Overflow
If there are two pages of floating elements in the left containers output over the content of containers went to the right will lead to below. This means that your margin, or the width of the padding installed confusion, but not reflected in the FF inside out. Use overflow: hidden or overflow: scroll IE allows content can be avoided out of containers.
Allow blank block elements AutoFill
CSS stands
Many people are margin-top, margin-right, and margin-bottom, margin-left of the use of a pile. In fact, this is the most basic, can be directly used as margin margin: on the left of the right lower. CSS can be seen in the stands summed up.
Avoid unnecessary for the choice of the mode of choice for the reduction to a minimum. If you find yourself constantly write ul li () or () table tr td demonstrated a detailed written too. Fewer selector will let you more easily find the problem.
I did not fully translate, and there are many of them my own, huh.
Original: http://my.donews.com/siwei/2006/10/26/SPyJrLSBLbXuZRlQwlwtzqgRgKmEYpuReSAw/
Tags: css templates, div skills, div top, Top Border Width, Top Margin, Top Padding






Leave a Reply