If i'll put margin-top to the first list item(LI), then margin is outside of ul.
Same thing for last item and margin-bottom. But margin-left/margin right works as expected..
Why is that and is that fixable?
See :Fiddle Link
Cheers
Your ul contains only one element witch actually has working margin. You should replace this code
<li>
This is a test<br>
This is a test<br>
This is a test<br>
This is a test<br>
</li>
With:
<li>This is a test</li>
<li>This is a test</li>
<li>This is a test</li>
<li>This is a test</li>
There is nothing between a ul tag and an li tag. They essentially follow each other. What you want is padding in the ul, not margin in the li.
`, look here for a proper one: http://jsfiddle.net/Meapn/1/
– Andy Aug 03 '12 at 09:14in
in a