Css and php notes involved in application development share some problems encountered in the application and solutions, and make some records for future use.
1. absolute positioning of the layer.
There are two p layers. the main class p is the overall layer, and the cloud class p is the absolute positioning layer. The effect is to display a GIF image of a cloud in the upper right corner of the screen. The p layout code is as follows:
The code is as follows:
...
At one time, the cloud layer was placed in the main layer during the process, which made ie unable to display the cloud layer. Then, the cloud layer is released outside the main layer, and the position of main is changed to relative to solve this problem. The CSS code is as follows:
The code is as follows:
. Main {
Position: relative;
Top: 30px;
Width: 600px;
Height: auto;
Text-align: left;
Background-color: # FFFFFF;
Border: 5px solid # FF0011;
}
. Cloud {
Background: url (../image/cloud.gif) no-repeat 100% 50%;
Height: 171px;
Position: absolute;
Right: 0px;
Top: 0px;
Width: 345px;
Z-index: 1000;
}
2. select implementation in the drop-down box of year, month, and day.
The drop-down box of year, month, and Day is dull, and the date cannot change with the change of year and month. However, this is a relatively preliminary solution, and also referred to other people's methods on the Internet. The updated method will be studied later.
The code is as follows:
$ Months = array (1 => 'August 11', 'August 11', 'August 11', 'August 11', 'August 11', 'August 11', 'August 11 ', 'August 11', 'August 11', 'August 11', 'August 11 ');
$ Days = range (1, 31 );
$ Years = range (1930,2011 );
Echo' ';Foreach ($ years as $ value ){Echo"$ Value year";If ($ value = 1987 ){Echo'1987';}}Echo'';
Echo' ';Foreach ($ months as $ key => $ value ){Echo"$ Value";}Echo'';
Echo' ';Foreach ($ days as $ value ){Echo"$ Value day";}Echo'';
?>