Вопрос

I am trying to keep my texts next to an image on the same horizontal level

I have something like

<div>
    <img src='test.png'/>
    <a href='#'>This is the test here</a>
</div>

it shows

 -----
|     |     This is the test
|     |
 -----

here

 -----
|     |     This is the test
|     |     here
 -----

How do i fix this? thanks!

Это было полезно?

Решение

div {
    clear:both;
    float:left;
}
div img{
    float:left;
}

div a{
    float:left;
}
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top