CeskyFrenchGermanItalianPortugueseTurkceSpanish

How to know when will the repair of the house
08/20/2016
KOSHELEK- house for your money
08/20/2016

How to make a menu on the site

How to make a menu on the site

Menu is used to facilitate navigation for the user sections on the site.

To attract the attention of the visitor, the menu should be functional, easy to use and at the same time combined with the design of the whole resource.

instructions

1

Before you create a menu, decide to its type. You can create horizontal or vertical pull-down unit, which will be shown to the user when you hover the mouse cursor. When choosing a menu, you can be guided by how the visitors will be convenient to use it and how it will be combined with the design.

2

After selecting the type of file, open your pagewith any text editor that you use to edit HTML. Navigate to the desired area code to which you want to insert your interface element.

3

Then make a list of options, creating a block & lt-div> and making a numbered list with assigned to it id. For example:

& Lt-div id = «panel»>
& Lt-ul> & lt-li> & lt-a href = «e»> Link 1 & lt- / a> & lt- / li>
& Lt-li> & lt-a href = «e»> Link 2 & lt- / a> & lt- / li>
& Lt-li> & lt-a href = «e» id = "open"> link 3 & lt- / a> & lt- / li> & lt- / ul> & lt- / div>

In this example, it was created by a bulleted list of three elements, that is placed in a layer of a div with an assigned identifier panel.

4

Go to block & lt-style> section& Lt-head> & lt- / head> of your page and create a corresponding menu Cascading Style Sheets. If you want to create a horizontal menu to get the list, you can enable inline attribute:

& Lt-head> & lt-style type = «text / css»>
#panel ul li {display: inline-}

5

To create a horizontal line across the length of the page you can use the following code:

#panel ul {margin-left: 0- padding: 2px 0-}

6

Then you can do a visual split into rectangles:

#panel ul li a {margin-left: 3px- border: 1px- padding: 2px 3px- background: blue-}

This code sets the indentation of the text from the elementsborder through the attributes of the margin-left and padding, as well as sets the background color for each of the items in the list. In this example, the color blue is specified, but it can change you in its sole discretion.

7

To specify the paragraph of the current page, which is selected in the tab, set the open class of the relevant parameters:

#menu ul li a # open {background: red- border-bottom: 1px-}
& Lt- / style>
& Lt -! - Further code ->
& Lt- / head>

Current page is selected in the panel, it will now be displayed in red.

8

Save the file and checkperformance written code by opening your page through a browser. To set additional display options, you can always add CSS or HTML code to improve the appearance of the object.

Comments are closed.