Vertical:
For verticals, you must use something like:
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
And just use this:
ul {
list-style: none;
margin: 0;
padding: 0;
}
This will remove paddings margins and list style. And you will have a vertical list. Now place it where you want!
Horizontal:
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
Now for this there is just one more line in CSS:
ul li {
display: inline; // this is used to place elements in one line..
}
Others will be same!
This is all! Now you can place this list in your div. And it will work!
To position it, you can either use position: absolute
for this you will require to use position: relative
for the parent div. Or you can use padding:
or margin
. That's all that you would require!