Jump to content
  • 0

Выравнивание текста и изображений


fast338
 Share

Question

Доброго времени суток!

Пытаюсь создать на Drupal что-то вроде профилей, где текст идет справа от изображения. Изначально выглядело так:

2319422m.jpg

Попользовав гугл удалось добиться с помощью этого кода:

.views-field-field-pol-value  {display: inline-block;
width: 100px;
vertical-align: top;
text-align: left}
.views-field-field-data-rojdeniya-value {display: inline-block;
width: 100px;
vertical-align: top;
text-align: left}
.views-field-field-bro-and-sist-value {display: inline-block;
width: 100px;
vertical-align: top;
text-align: left}
.views-field-field-forma-ustroistva-value {display: inline-block;
width: 100px;
vertical-align: top;
text-align: left}
.views-field-field-fio-value {display: inline-block;
width: 100px;
margin: 30px 20px 0 0;
vertical-align: top;
text-align: left}
.views-field-field-images-fid {display: inline-block;
width: 400px;
margin: 0 10px 15px 0;
vertical-align: top;
float:left;
}

только такого результата:

3154401m.jpg

кусок исх. кода

<div class="view-content">

<div class="views-row views-row-1 views-row-odd views-row-first">

<div class="views-field-field-images-fid">

<span class="field-content"><a href="/content/%D0%B0%D0%B5%D0%BF%D0%BF" class="imagecache imagecache-profile imagecache-linked imagecache-profile_linked"><img src="http://localhost/sites/default/files/imagecache/profile/img/5-p2.jpg" alt="" title="" class="imagecache imagecache-profile" width="200" height="200" /></a></span>

</div>

<div class="views-field-field-fio-value">

<span class="field-content"><a href="/content/%D0%B0%D0%B5%D0%BF%D0%BF">Петров Петр Петрович</a></span>

</div>

<div class="views-field-field-pol-value">

<label class="views-label-field-pol-value">

Пол:

</label>

<span class="field-content">Мужской</span>

</div>

<div class="views-field-field-data-rojdeniya-value">

<label class="views-label-field-data-rojdeniya-value">

Дата рождения:

</label>

<span class="field-content">01.02.2010</span>

</div>

<div class="views-field-field-bro-and-sist-value">

<label class="views-label-field-bro-and-sist-value">

Братья или сестры:

</label>

<span class="field-content">Да</span>

</div>

<div class="views-field-field-forma-ustroistva-value">

<label class="views-label-field-forma-ustroistva-value">

Форма устройства:

</label>

<div class="field-content"></div>

</div>

</div>

<div class="views-row views-row-2 views-row-even views-row-last">

<div class="views-field-field-images-fid">

<span class="field-content"><a href="/content/%D0%BC%D0%B8%D0%BA%D1%83%D0%B5" class="imagecache imagecache-profile imagecache-linked imagecache-profile_linked"><img src="http://localhost/sites/default/files/imagecache/profile/img/aleksandr_d._11_aprelya_2010_g.r._opeka.jpg" alt="" title="" class="imagecache imagecache-profile" width="200" height="200" /></a></span>

</div>

<div class="views-field-field-fio-value">

<span class="field-content"><a href="/content/%D0%BC%D0%B8%D0%BA%D1%83%D0%B5">Васин Василий Васильевич</a></span>

</div>

<div class="views-field-field-pol-value">

<label class="views-label-field-pol-value">

Пол:

</label>

<span class="field-content">Мужской</span>

</div>

<div class="views-field-field-data-rojdeniya-value">

<label class="views-label-field-data-rojdeniya-value">

Дата рождения:

</label>

<span class="field-content">ноябрь 2009</span>

</div>

<div class="views-field-field-bro-and-sist-value">

<label class="views-label-field-bro-and-sist-value">

Братья или сестры:

</label>

<span class="field-content">Нет</span>

</div>

<div class="views-field-field-forma-ustroistva-value">

<label class="views-label-field-forma-ustroistva-value">

Форма устройства:

</label>

<div class="field-content"><div class="field-item field-item-0">Удочерение</div><div class="field-item field-item-1">Опека</div></div>

</div>

</div>

</div>

Как только ни крутил ни вертел, ни как не хочет ровно и аккуратно встать справа от картинки.

Подскажите пожалуйста, как можно добиться нужного обтекания?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy