Some techniques and problem solutions commonly used in my own front-end development will be updated frequently. I hope it will be helpful to friends on the front-end road.
1. How to display the date on the right in the article title list (two methods are provided, and the use depends on the situation):
Method 1: The idea on the second floor of this version (thank you~), consumes less resources and has two more lines of code.
<p>@Mr.ThinkThis is the title of the article<span>2010-10-10</span></p>
CSS definition:
p{position:relative}
p span{position:absolute; right:0}
Method 2: The code is less than method 1, but it consumes more resources.
<p><span>2010-10-10</span>@Mr.ThinkThis is the title of the article</p>
Then define span right float:
p span{float:right}
In fact, this method can be extended to many situations and is a very practical way of writing;
2. According to web standards, there can only be one h1 tag in the same page. Many people know this concept, but few do it;
3. The problem of white space margins overlapping each other: It is generally avoided by adding a transparent border or a 1px padding. Detailed interpretation: http://mrthink.net/css-margin-overlying-way/ ;
4. Max/min-width/height is implemented under ie6, _width: expression(this.width >600 ? "600px" : true); , height is the same.
5. html/class/id, it is best to write it in lowercase, which is more rigorous (in line with the xhtml standard);
6. It is not recommended to use the following code to be compatible with IE8:
<meta http-equiv="X-UA-Compatible" content="IE=7" />
If it is a non-short-term page, try to avoid using it. The page should be as backward compatible as possible.