Why does div
scroll with arrows key but ul
does not do it? This is related to another question i have made but no one answer yet.

- 1
- 1

- 520
- 1
- 6
- 19
-
1You ask "Why does `div` scroll with arrows key but `ul` does not do it?" Are you asking this in some sort of general sense, or are you asking why, when you use the code in your other question, this happens? If it is in a general sense then the link to your other question does not belong in this question because it is irrelevant. If the answer you are looking is about how these elements behave when used in the code you have in your other question, then this question is a duplicate. – Louis Apr 03 '14 at 14:36
-
Agreed with @Louis. Note that my answer is given in a general sense and has nothing to do with the previous (linked) question. – Stuart Kershaw Apr 03 '14 at 14:51
1 Answers
The <div>
tag defines a division or a section in an HTML document.
The <div>
tag is used to group block-elements to format them with CSS.
Taken from w3school.com/div
The <ul>
tag defines an unordered (bulleted) list.
Use the <ul>
tag together with the <li>
tag to create unordered lists.
------> it is only a structure Element whom´s Job it is to safe a structure. Like this element comes after that element and that element over there right behind this etc.
Taken from w3schools.com/ul
If u want an <ul>
with scrollbars just put the <ul>
inside a <div>
give the <div>
a width
and height
and apply the overflow: auto
CSS style to it.
From now on you will have youre unordered list with cool scrollbars.
Well in fact scrollbars of the div, but who cares......
there is an unordered list and there are scrollbars ;)----------

- 11,434
- 1
- 20
- 38