How to position some text?
- by Faery
Sorry for the noobie and stupid question, but I know only a bit about css and I don't know how to style my site. Here is my code:
HTML (Twig) :
<div class="wrap">
<div>
<img class="birthday" src="http://www.clker.com/cliparts/1/d/a/6/11970917161615154558carlitos_Balloons.svg.med.png">
<div class="try">
This friends have brithday today:
{% for bd in birthdays %}
<p>
<a href="{{ path('friend_id', {'id': bd.id}) }}">{{ bd.name }}</a>
<span class="years">
({{ bd.years }} years)
</span>
</p>
{% endfor %}
</div>
</div>
</div>
CSS:
body {
background-color: #FFFFF1;
text-align: center;
font-size: 17px;
font-family: Tahoma, Geneva, sans-serif;
}
p {
margin: 10px;
}
a {
text-decoration: none;
color: #6a9211;
}
a:hover {
text-decoration: underline;
}
.wrap {
width: 700px;
margin: auto;
}
.birthday {
width: 49px;
height: 80px;
float: left;
margin-left: 150px;
display: block;
}
.try {
display: block;
margin-right: 150px;
margin-bottom: 50px;
}
.years {
font-size: 12px;
}
And this is what I get. The thing I want to fix is Maria and Peter to be display under Anna and John, all of them 4 centered under the label This friends have birthday today:. I know that it's because of the image, but I don't know how to make it look fine. :(
Please help! Thanks in advance!