Share the css and php notes involved in application development

Source: Internet
Author: User
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'';
?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.