/ / A frame is what? Structure and creation of frames

A frame is what? Structure and creation of frames

A frame is an area on a site (window) in whichsee another web page. Webmasters use this opportunity to showcase the main page of the site of their friends or partners. The same technique is used to display the search form in the windows and its result, and so on.

But basically the frames are used in creatinglarge web portals, where a lot of menu items and submenus are required. About these usually say: "site on the frames." To create such a resource requires a good knowledge of the HTML-language.

Creating frames in the site builder

Some website designers provideautomatic generation of such code. Usually the button for adding a frame is in the main menu of the program. First you need to place the cursor in the desired place on the page, then click the button, the window will open (as shown in the screenshot). In it you can set the address of the page that will open in the frame, and adjust the dimensions: width and height.

But basically the frames are used in creatinglarge web portals, where a lot of menu items and submenus are required. About these usually say: "site on the frames." To create such a resource requires a good knowledge of the HTML-language.

Framing

With the help of this "service" it is possible to create several frames on the page, that's just the interconnected elements so you do not get.

Frames in CMS

Many programs for creating sites provide the ability to install the appropriate module. For example, for the Joomla frame, this is the "Wrapper" module.

frame this

It can be found and created in the CMS control panelJumla: "Extensions" - "Module Manager" - "Create" (a round button of orange color with a plus sign inside). In the pop-up window, in the list, you will see the "Wrapper" module.

If he is not here, then it is not included.To use it, you first need to activate it here: the "Extensions" tab, then "Extension Manager", then the "Management" tab. And look in the list that opens, you can enter the word: Wrapper for a quick search in the "Filter" field. Opposite this module should be a green icon with a tick inside. A red circle with a dot inside will indicate that the plugin is turned off.

After this procedure, you can return to the "Module Manager", create a frame and set its parameters.

what is a frame

As can be seen in the picture, the module allowsset: the header above the frame, the position of the module, select the pages of the site on which it will be displayed. And also adjust the width, height; add a frame and the actual link to the web page. If in the frame you want to display the main page of a site at full width, then 100%, set by default, will not be enough. You can immediately put it safely 400%. Altitudes of 200 are usually enough to display the top page menu. All the rest of the content will be visible if the user (the site visitor) uses the scroll bar.

Here is an example of what a frame in Jumla is.

frames examples

The Jumla module for creating a frame is very convenient and easy to use. However, its capabilities are limited, as are the capabilities of the designer.

History and reality

In the practice of creating sites from frames, this tag(its application) has long since receded into the background. They were able to replace modules, settings in the designer programs that generate code for the web page without the participation of the site builder. However, in some cases this is not enough. For example, when a frame is an integral complex structure of the areas displayed in the browser. This is how its owners see the complexity of structured sites. On its creation are only in extreme cases, because Framey's sites are created exclusively with the help of specialized tags.

Complex structured sites

For them, the creation of several interrelatedframes is the optimal solution for organizing content on the pages of the resource. This, as a rule, large portals, growing every year more and more.

How to achieve the same result? How to create a frame structure?

frame structure

How to write a frame into the page code

Frames in HTML are added using tags:

  • frame (for a separate window);
  • frameset (it creates an entire structure with the help of it);
  • iframe ("floating" frame);
  • noframes (in case the frame is not displayed in the user's browser).

The first specified tag always fits in the pair and . And it replaces and . And with the help of the appropriate attributes, you can adjust the characteristics of each element: the name (name =), the size (cols = and rows =), the border (border), the scroll bar and, of course, the link to the web page to display.

Design variations

The whole page of the site can be divided into areas. For example, this:

Left

Upper frame

Right

Such a structure (it is called nested) can beget by setting inside the tag the attribute cols, which means the horizontal position of the frame, and rows - vertically. The next is the = sign and the dimensions are written. For example, 60%, 40% - the percentage (one window will take 60% of the browser space, the other, respectively, 40%). Or 100, 200 - the ratio of the sizes in pixels. The size of one of the frames can not be set at all (it will be installed by default). To do this, you must specify a * after the comma or after it.

Within this pair, frameset registers each frame with the parameters: src =, then quotes are followed by a link to the web page and name = with the header (for example, Frame 1).

The nesting of each new area is indicated by a new frameset.

Example code:

Notice that in our example, for frames of the second and third dimensions, only one time is written.

A lot of zadumok allow you to execute frames.Examples of their location in the browser window can be brought endlessly (changing the code accordingly). However, this information does not find practical application for a long time. Frames, if used today when creating sites, then only in the form of modules in free CMS or in the form of iframe.

Floating frame

site on frames

Strange why he got such a name, heremore appropriate word "built-in." This frame was created to display the contents of the file. You upload a document or a file to the database, using the tags of the iframe, set the path to it and visitors will see the text of the file (video or image). Unfortunately, browsers do not always display content. To do this, web builders enter between the opening and closing tags the phrase: "Your browser does not display the content."

For example, Seopult.ru - well-known service for promotion masters. But not his main site, but the mirror I.seopult.pro, created for portal clients. The code of the iframe is written here:

  • Instruction . Where the
  • tag is created to define a list item. Supported by all browsers.

    On the very page of the mirror you can see the word "Instruction" in the form of a button. Clicking on it in the center of the browser window opens the presentation.

    All major sites for watching movies and TV shows are created with the help of i-frames (for example, "Imhonet"), as well as social networks. Even the main page of Yandex contains this tag, and not just one pair.

    How to prescribe an iframe

    Download the document in the form of a window with a stripscrolling is possible at any place. Usually tags are placed inside the body. In addition to the standard

    and , as was shown in the example above, the list tag can also be used -

  • .

    Attributes are added to the iFrame:

    • width (width) and height (height =);
    • align alignment;
    • indents, which can be and not to register: the default value is 6 - this is quite enough;
    • using the usetransparency, you can set the transparency of the frame area so that the background of the page is visible;
    • plus the familiar scr, name, scrolling, border.

    Navigation with an i-frame

    The most interesting skill in the field of creationframes is writing code that allows content to be opened in a window by reference, which is what the creators of the Seopult mirror did, only at once with several links (simultaneously available to the user on one page).

    To do this, take an iframe, in it additionallyprescribed name through name =. For example, zagolovok. Then, in front of it in the tags and links are written through a HREF = with the obligatory indication after them of the attribute target = zagolovok. Before using the closing tag a, an inscription is indicated that will serve as a link button. Tags "a" opening and closing are enclosed in a tag p.

    There are several such lines in the code, so that, as a result, the site can get several buttons-links in one row, clicking on which will display different content in the window below.

    The code will look like this:

    place an ad

    view ads