studio

разработка сайтов

Добро пожаловать, Гость
Пожалуйста Вход или Регистрация.    Забыли пароль?

Aligning thumbnails with Smartresizer
(1 чел.) (1) Гость
ВнизСтраница: 1
Сообщения темы: Aligning thumbnails with Smartresizer
*
#710
Aligning thumbnails with Smartresizer 1 г., 9 мес. назад Репутация: 0
I am using the Smartresizer plugin to resize my article photos (make thumbnails) for the front page view.

Is it possible to set the thumbnails on the front page to always be left-aligned, even though the images in the articles are right-aligned?

Thank you.
asbjornvg
Fresh Boarder
Постов: 3
graphgraph
Пользователь в оффлайне Кликните здесь, чтобы посмотреть профиль этого пользователя
Для добавления сообщений Вы должны зарегистрироваться или авторизоваться
 
#711
Re: Aligning thumbnails with Smartresizer 1 г., 9 мес. назад Репутация: 6
You can use this guide www.lot-studio.ru/en/devarticles/111-artsmartresizer
to set separate image decoration for article and blog layout.

Use float:left and float:right property of .smartresize class and clear align in <img> tag
Igort
Administrator
Постов: 560
graph
Пользователь в оффлайне Кликните здесь, чтобы посмотреть профиль этого пользователя
Для добавления сообщений Вы должны зарегистрироваться или авторизоваться
 
#722
Re: Aligning thumbnails with Smartresizer 1 г., 9 мес. назад Репутация: 0
Thank you for the quick reply Igort

It worked! Thanks a lot

I used the .blog img.smartresize selector in my CSS to make the thumbnails float:left in the front page view, and for the article view I used just the .smartresize selector to make the images float:right.

I didn't even have to clear the align property in my <img> tag. Does the CSS "float" property override the "align" property in the <img> tag? What's the difference between float and align anyway?
asbjornvg
Fresh Boarder
Постов: 3
graphgraph
Пользователь в оффлайне Кликните здесь, чтобы посмотреть профиль этого пользователя
Для добавления сообщений Вы должны зарегистрироваться или авторизоваться
 
#724
Re:Aligning thumbnails with Smartresizer 1 г., 9 мес. назад Репутация: 6
If you use TinyMCE and set "align" property on Image properties window of TinyMCE to "Left", then TinyMCE inserts 'style="float:left"' to IMG tag. So the full tag looks like this:
Код:

<IMG class="smartresize" style="float:left">

and style property can override alignment setted by smartresize class. You should not use align property in TinyMCE for images.
Igort
Administrator
Постов: 560
graph
Пользователь в оффлайне Кликните здесь, чтобы посмотреть профиль этого пользователя
Для добавления сообщений Вы должны зарегистрироваться или авторизоваться
 
#726
Re:Aligning thumbnails with Smartresizer 1 г., 9 мес. назад Репутация: 0
I'm using the TinyMCE 2.0 Editor, but it doesn't work the way you describe.

If I set the "align" property to "left", TinyMCE inserts just that into the <img> tag (align="left").

And if I try to manually write style="float:left" or style="float:right" in the advanced html editor, it just disappears as soon as I press OK.

It looks as if the editor doesn't respond to the "style" property or just ignores it.

Why is this? How can I then make exceptions to the "float:right" that I set earlier with the .smartresize CSS class - for example if I want an image on the left hand side of an article?
asbjornvg
Fresh Boarder
Постов: 3
graphgraph
Пользователь в оффлайне Кликните здесь, чтобы посмотреть профиль этого пользователя
Для добавления сообщений Вы должны зарегистрироваться или авторизоваться
 
#727
Re:Aligning thumbnails with Smartresizer 1 г., 9 мес. назад Репутация: 6
Try to switch TinyMCE in advanced mode in editor parameters. Also set parameter of the editor "Clear HTML" to none.
Igort
Administrator
Постов: 560
graph
Пользователь в оффлайне Кликните здесь, чтобы посмотреть профиль этого пользователя
Для добавления сообщений Вы должны зарегистрироваться или авторизоваться
 
ВверхСтраница: 1
Модераторы: Igort
получить последние сообщения прямо на Ваш рабочий стол