How to make a frame on the website

How to make a frame on the website

The framework which is located around pictures or the text decorates the website and brings a variety its design. If for creation of fringings to use tables, then the code of each frame will take too much place. Also in this case for each border it is necessary to register the HTML-code again. By means of CSS it is possible to make easily a frame of any thickness and right color, having once registered the simple code for all elements which will be surrounded with this frame. Such technology will allow to change if necessary in a couple of minutes a type of a framework on the website. It is required to you • - have own website; • - know that such CSS and where these styles register on the website. Instruction 1. To create a frame, at first write such code to CSS: ramka {} 2. In order that the frame was the necessary size, use the border-width parameter which assigns lines width in pixels. For example, if the line of a frame should be 3 pixels wide, then record will look so: ramka {border-width: 3px; } 3. Now define style of a frame by the border-style parameter. If you want to create a frame which parties are normal solid lines, then place in the code between curly brackets such record - border-style: solid. 4. The border consisting of points can be received, having written so: border-style: dotted. Having noted border-style: dashed, you receive a dotted frame. 5. It is possible to make a fringing a double solid line so: border-style: double. For execution of the text or pictures with effect of the volume parties write border-style to a framework: groove or border-style: ridge. The difference between these two options is that in the first case the frame consists of the pressed lines, and in the second - from convex. 6. For creation of effect of the element of the website pressed together with a frame use this code: border-style: inset. To make frame contents together with a border on the contrary convex, write border-style: outset. 7. It is possible to give right color to a frame by means of the border-color parameter placed also between curly brackets. If you want to make a frame red, then write border-color: red, blue - border-color: blue, orange - border-color: orange. 8. The code of a frame in CSS including all parameters looks so: ramka {border-width: 3px; border-style: solid; border-color: blue; } 9. Now in HTML make such record:
frame Contents
Instead of a phrase "Frame Contents" insert the text or the code of the necessary picture. 10. Thus it is possible to make out an unlimited number of elements on the website. For change of a type of a frame it is necessary to make changes only to the CSS code.

Author: «MirrorInfo» Dream Team


Print