How to insert a banner?
Watch the video
Contextual and referenced advertising is in demandowners of sites, however does not think to hand over positions and banner. Vivid pictures always catch the eye and focus attention. A competently created banner can attract more visitors to a particular resource. You can create this type of advertising yourself, if you make a little effort. However, if you are familiar with Photoshop, then problems should not arise. Consider how to make and put a banner.
The first stage: the creation of a banner
In short, you can make it the most convenient way for you:
- order from a freelancer;
- develop independently;
- use programs to create banners;
- use online servers to create banners.
For more information, see How to make a banner.
The second stage: the placement of a banner
The banner is also inserted into the site in different ways. In order to do this, it's good to have knowledge of the web programming language. But if there are no such skills, this is not a problem - everything is elementary. More information about the options for placement - see How to Place a Banner.
The banner code has a fairly simple structure:
- <a href=" place where the banner leads>> <img style ="position: absolute; top: 50px; right: 300px; border: 1px solid # ddad22;" src = "/ images / link indicating the location of the banner" "alt =" inscription "border =" 1 "/> </a>
Let's look at the meaning of the individual elements:
- position:absolute - indicates the positioning of the element relative to other objects on the page. When such a value is set, the banner is positioned transparently - that is, other elements are reflected as if there is no banner. Site header in the form of a solid picture? Then, to insert your banner correctly, change the position from absolute to relative.
- top: 50px - indicates the position of the element relative to the top edge of the cap. By changing the value, you can move the banner up and down.
- right: 300px - indicates the position of the element relative to the right side of the site header, you can also change it.
- border: 1px - this is the thickness of the stroke of the banner (if not needed, set to 0)
- solid # ddad22 - the color of the stroke, it can be changed at your discretion.
The way to the banner
Insert the resulting code by following the path: toolbar - editor - header.php
Open the header file. In it it is necessary to insert the code - it is usually advised to insert into the tag area. Check.
"Play" with the values of the elements of the code, if you do not get the desired type of banner right away.
Banner advertising company
To insert a banner, write in the code of the header in the header code:
- <div class = "ban">
here, write an advertising banner script
- </ div>
Open the style.css file. Here, write down the following:
- display: block;
- position: absolute;
- left: 321px;
- top: 45px;
- width: 468px;
- text-align: center;
The code should be pasted to the end of the file. The values of top, left can be changed. Like wigth - this is the width of the banner.