Tip 1: To add a scroll bar

Scroll bars (Scroll bars) - it's vertical and horizontal strips placed along the right (when writing from left to right) and lower edges of the window, or separate area within the window for moving the contents of the vertical or horizontal directions.To control their appearance and behavior in the web pages used to describe elements of language styles CSS (Cascading Style Sheets - «Cascading Style Sheets"), built into the language HTML.
Guide
1
Use tag div, if you want to make the scroll bar is not for the whole page, but only for limited its scope.In the language of HTML (HyperText Markup Language - «hypertext markup language") "tag" refers to the individual teams browser to display a particular page element.In its simplest form tag div (often called "layer") is written as:
& lt; div & gt; This is the text inside the layer & lt; / div & gt;
you & lt; div & gt;- Opening tag, and & lt; / div & gt;- Closing.All that is taken between the opening and closing tags, stored in a layer in the contain
er, and the container sizes can be specified - width and height.This is done using an additional parameter ("attribute») style, which should be added to the opening tag:
& lt; div style = "width: 300px; height: 300px;" & gt;

This text is inside a layer

& lt; / div & gt;
2
Specify in the style attribute div tag and rules for scrollbars layer too:
& lt; div style = "width: 400px; height: 200px; overflow: auto;" & gt;

This text is inside a layer

& lt; / div & gt;There
overflow: auto means that the scroll bar will appear automatically, that is, when the contents of the layer will not fit in the specified size.If auto replace scroll, these strips will always be present, irrespective of whether they are needed or not.A hidden value will have the opposite effect - scroll will never appear, even if the contents of the container will not be seen for its edges.
3
Use the same method for adding scroll bars to the page as a whole.By default, they appear as necessary, but if for any reason there is a need in their continuous presence on the page, the source html-code should be added to the corresponding style rule.Find the code page end tag header of the document & lt; / head & gt;and before him enter the style guide:
& lt; style type = "text / css" & gt; body {overflow: scroll;} & lt; / style & gt;

Tip 2: How to make the scroll bar

In our time to have your own website - not a luxury but rather a necessity.Its creation requires certain skills and knowledge of html.Create a simple website is quite simple.However, its decoration and the creation of interactive elements that provide additional functionality to the site will cause the novice difficulty.One of these interactive elements that enhance the convenience of visitors - the band scroll .It is particularly useful in the fields of site providing its connection with scripts (the interaction with site users).
Scroll bar - an important element of the website
you need
  • Internet or any tutorial on html
Guide
1
The most important thing to any website - the user's convenience.The very idea of ​​using the scroll bars on your site would be appropriate only if it is not dictated by the appearance of your desire, and its necessity.Make the layout of the page to which you want to put a band scroll .Choose a place to scroll (also known as scroll bars ).
2
Select a location for the strip scroll you are interested in the page.It should be rigidly connected with any member (e.g., a text field or a drop-down list).This is the place you have to calculate in pixels or as a percentage.Make it easy, especially if the site layout is clearly structured.
3
between the BODY tags, you must add code to a standard scroll.It can be found in any textbook on html.There are two options - either to add the track directly in html code for the page, or attach the style sheet css.The second method is more convenient if you change more than one page and the entire site at once.Then you need to enter the color band settings scroll , otherwise it will be dull and uninteresting.The figure shows the elements of the scroll and signed.Parameters need to enter the same as shown in the figure, separated by semicolons.
Parameters strip
4
Now you have to test their improvement.To scroll strip looked the same in all browsers, check it on the main - Internet Explorer, Mozilla Firefox and Opera.If it does not work on one of them, go back to the first stage and correct any errors.
Helpful Hint
There is a simple way to create a scroll bar for web-page.Ask a height parameter for your site 75%, while scrolling will itself.However, its color scheme is still configured.
Sources:
  • site for beginners web-developers

0
0