Code solutions to PHP, JS, CSS

Spread your code soluces to the world

Love me

Search results for : page    (10)

Extract images from a page (php)

Getting all IMG sources and ALT from a local or remote page that returns an array. This function uses the DOM API from PHP 5. get_i( file ) = array( att, value )
solucior.com/26-Extract_images_from_a_page.html

Page to top (javascript)

ToTop() function associated with a link back to the top of page.
solucior.com/27-Page_to_top.html

Horizontal scroll div with javascript (javascript)

Very simple method to horizontally scroll a DIV content without displaying scrollbars with Javascript. • The container div has overflow:hidden and a fixed height and width. • Its ID has to be recalled in the scrolldiv() function calls. This allows the multiple use of this function on the same page.
solucior.com/34-Horizontal_scroll_div_with_javascript.html

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...
solucior.com/35-Centering_an_element_in_the_page.html

Extract links from a page (php)

Getting all A HREF links from a local or remote page that returns an array. This function uses the DOM API from PHP 5. get_a( file ) = array( att, value )
solucior.com/25-Extract_links_from_a_page.html

Link confirmation (javascript)

This method adds a confirmation dialog on a href link.
solucior.com/21-Link_confirmation.html

Scroll div with javascript (javascript)

Very simple method to vertically scroll a DIV content without displaying scrollbars with Javascript. • The container div has overflow:hidden and a fixed height. • Its ID has to be recalled in the scrolldiv() function calls. This allows the multiple use of this function on the same page.
solucior.com/13-Scroll_div_with_javascript.html

Div following the scrolling of the page (javascript)

CSS fixed positioning does not work on Internet Explorer based browsers, it is therefore useful to use the javascript to fix vertically a DIV block. This function addresses the value of the div top CSS "fixedtop" taking into account the scrollTop of the page in the window. Tested on the most common browsers.
solucior.com/16-Div_following_the_scrolling_of_the_page.html

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...
solucior.com/19-Dynamic_image_resizing_according_to_location.html

Create virtual folders using htaccess (htaccess)

These 3 lines of code for .htaccess create virtual folders. An URL like www.mywebsite.com/virtual_folder/home.html will be understood by the server as www.mywebsite.com/index.php?dir=virtual_folder&page=home
solucior.com/7-Create_virtual_folders_using_htaccess.html