Reputation: 367
I want to build a list of itens. Each item should be in one line, like several paragraphs.
Why my div.empresa elements are on same line? I think they should be on different lines because the display property of them is block.
Take a look at code: http://jsfiddle.net/Yz8Cq/
Upvotes: 3
Views: 17163
Reputation: 16010
Actually, removing float: left
from the label
will make the arrow span
appear to the left of the label
. Assuming you want the arrow span
s to continue to show up on the right of the label
s, then you want to add:
#ListaDeEmpresas div.empresa {
clear: left;
}
This will make sure each label/span set appears below the previous one.
Upvotes: 3
Reputation: 13947
You need to remove float: left;
#ListaDeEmpresas .arrow {
height: 50px;
width: 20px;
background: url("/Content/SetaBrancoh40.png") no-repeat center center;
background-color: #A9462F;
}
http://jsfiddle.net/spacebeers/Yz8Cq/5/
Floats can be a bit tricky to get your head around at first. This article is excellent - http://css-tricks.com/all-about-floats/
Upvotes: 11