Code solutions to PHP, JS, CSS

Spread your code soluces to the world

Love me

Search results for : automatic    (4)

Automatically adjust brightness contrast of an image (php gd image)

This script adjusts the brightness and contrast of an image using PHP5 and the GD2 library. Set the variable $url_img with the path of your initial image. You can change the variable  which corresponds to the size of the working image of the script.

Automatic search result page (htaccess)

Here is a simple method using htaccess to turn an URL to a search results page. Htaccess code obviously not include the search engine. It only transmits the variable q to be treated by your internal search engine. Elegant and efficient solution to capture a indexing bot a on keyword page. If your data is in MySQL...

Dynamic image resizing according to location (javascript)

This javascript method resize image according to its location in the page. Images do not overflow the page or div that contains them. It works automatically, it is not necessary to modify the HTML content of the body. Implementation : • copy the javascript code in the header, between <head> and </head> • In the body...

Centering an element in the page (css)

Here are two methods to center CSS DIV blocks inside the page or parent element. The first method uses absolute positioning wich does not consider the position of other page elements. It is recommended for a rapid implementation of a correctly set graphical template. The second method uses a div to wedge the second DIV in height. The horizontal...