Иконизируем ссылки
![]()
Иконизировать ссылки по определенным параметрам и свойствам очень умный шаг в пользу юзабилити, пользователь должен знать куда приведет его ссылка!
При виде иконки возле ссылки пользователь легко поймет что его ожидает, ибо формат иконок понятен для каждого пользователя любой операционной системы
Как это реализовать?
Реализовать это очень просто — с помощью всемогущего css.
Ответ на опережение.
—Да, способ не работает в IE6, но мне все равно :-)
Вот так это делается с помощью css.
Иконизируем по расширению файла
a[href $='.расширение_вашего_файла'] {
padding-right: 18px;
background: transparent url(имя_иконки.gif) no-repeat center right;
}
Очень просто! Вот вам еще пример, что бы Вы наверняка поняли :-)
a[href$='.txt'] {
padding: 5px 20px 5px 0;
background: transparent url(icons/icon_txt.gif) no-repeat center right;
}
Иконизируем по действию
Сразу перейду к примеру, например отправка письма(mailto):
a[href ^="mailto:"] {
padding: 5px 20px 5px 0;
background: transparent url(icons/icon_mailto.gif) no-repeat center right;
}
Вот и все.
Иконизируем по сайту
К примеру ссылка ведет на Википедию, так добавим ее иконку!
a[href *="ru.wikipedia.org"] {
padding: 5px 20px 5px 0;
background: transparent url(icons/wikipedia.gif) no-repeat center right;
}
Вроде все разобрали. Так же выложу ссылку уже на готовый пак с иконками.
Спасибо за внимание! ;-)

Чел, всё норм. Крути – не обращай внимания. Есть много полезностей.
Ну хоть вы, тов. Чернев, открыв новый блог на более-менее интересную тематику, могли бы не допускать ошибок сотен существующих – создавайте уникальный контент. Из пустого в порожнее, я эти примеры вижу ежедневно в своей RSS-ленте. Еще месяц чтения, и я точно смогу сказать, с какой группы сайтов вы сдираете весь контент, ведь первоисточник не указываете. Двойка за старания.
update by chernev: Нда, товарищ унылый Кал.
Продолжайте, уважаемый автор.
На мой взгляд выборка интересного материала из нескольких источников – это уже работа. Не всем обязательно писать новые статьи. Думаю просто имеет смысл указывать источник.
Зря вы так, действительно. И контент… Ладно переведённый, ладно из книжки, но вы бы ссылки бы поставили. Стиль тоже слабоват. Сделать, чтобы не работало в ie6 – не мудрено, только спеки CSS читай. Кроме того, если вам всё равно, работает ли оно в ие6 – обоснуйте это. Напишите призыв и остальным разработчикам, что, мол, уже пора перекидывать людей на другие браузеры. Дайте ссылку на noie.ru или browsehappy.com где-то на блоге. И, пожалуйста, или давайте полную статью на хабр, или перестаньте заниматься этим ПЕАРом. Спасибо.
А кому не нравиться не читайте, хватит у меня в блоге УГ разводить :-)
Источник я всегда указываю. В данном случае я просто не мог заново открыть синтаксис css.
это css3 ?
Не слушайте никого! Это лучший блог о веб-технологиях в моем rss
Я согласен что блог хороший, мне нравится, поэтому не слушайте всяких долбоебов которым лижбы потрындеть и пишите побольше хороших заметок
А не могли бы вы указать способ не через css, а через, к примеру, JavaScript для формы ввода, чтобы он при обнаружении подобной ссылки ставил её соответствующий класс?
А по поводу вышесказанного – но у вас же пишется так громко «Я собственной персоной», может заменить на что-то поскромнее для таких постов-копий?)
на своих проектах я использую пример с jquery:
http://blog.rebeccamurphey.com/2008/01/06/unobtrusive-cross-browser-add-filetype-icon-link-javascript-jquery/
Что значит постов-копий?
Отличный пост, в первый раз вижу такое применение css)
Согласен контент не уникальный, но я в своем блоге тоже собираю интересные на мой взгляд статьи, как в записной книжке, и оставляю ссылки на автора. Я как и автор этого блога занимаюсь выборкой интересного материала. И я благодарен автору блога ибо читать его мне интересно.
Я извиняюсь, но правильно — «расширение», а не «разрешение».
Оуч, реально ступил, ОГРОМНОЕ спасибо, исправил ;-)
Г-н Чернев, даже не думайте останавливаться. Ваш блог сейчас лучший в рунете по такой тематике.
Автору большое спасибо за весь блог.Интересные и действительно нужные и полезные вещи описываете.
Отличный блог! Побольше бы таких! Спасибо за Ваш труд!
От меня ADD FAVORITE , Все что я искал , находится здесь .. спасибо за ваш труд
Помоему хороший блог, читать всегда интересно!
спасибо за пак с иконками, возможно когда нить пригодится
Очень интересно. Даже и не знал что css на такое способен.
We are truly experiencing and enjoying the style along with layout of your respective website. This is a very easy around the face that makes it a lot more pleasant will occur below and also check out more regularly. Have you employ out and about a builder to make the style? Fantastic work!
I just want to mention I am beginner to blogging and honestly enjoyed this web blog. Almost certainly I’m want to bookmark your blog . You really come with tremendous well written articles. Cheers for sharing your blog site.
the piece lines are really mundane.
Cool info it is definitely. My girlfriend has been waiting for this content.
love a lot of the stuff especially the cute design
Thank you for your site post. Jones and I are in fact saving to get a new publication on this issue and your post has produced all of us to save our own cash. Your notions really clarified all our questions. In fact, much more than what we had thought of prior to when we stumbled on your wonderful blog. We no longer nurture doubts as effectively as a troubled mind because you’ve truly attended to our own needs in this post. Thanks
I’m impressed, I must say. Really rarely do I encounter a blog that’s both educative and entertaining, and let me tell you, you have hit the nail on the head. Your idea is outstanding; the issue is something that not enough people are speaking intelligently about. I am very happy that I stumbled across this in my search for something relating to this.
Some genuinely wonderful content on this site, appreciate it for contribution. «Such evil deeds could religion prompt.» by Lucretius.
I enjoy the efforts you have put in this, thanks for all the great content.
Sweet site, super style and design, rattling clean and apply pleasant.
Outstanding post, I think people should larn a lot from this website its rattling user friendly . «Frisbeetarianism is the belief that when you die, your soul goes up on the roof and gets stuck.» by George Carlin.
Hello my friend! I wish to say that this post is amazing, great written and come with approximately all vital infos. I’d like to peer more posts like this.
We still can not quite think that I could end up being one of those reading through the important tips found on your blog. My family and I are seriously thankful for your generosity and for presenting me the chance to pursue the chosen profession path. Many thanks for the important information I managed to get from your blog.
Thank you for helping out, superb information. «Job dissatisfaction is the number one factor in whether you survive your first heart attack.» by Anthony Robbins.
Carry on the fantastic work!
Thanks for the sensible critique. Me & my neighbor were just preparing to do a little research about this. We got a grab a book from our area library but I think I learned more clear from this post. I am very glad to see such fantastic info being shared freely out there.
Great work! This is the kind of info that are meant to be shared across the internet. Disgrace on Google for now not positioning this post upper! Come on over and seek advice from my website . Thanks =)
I believe you might have mentioned some quite intriguing points , regards for the post.
The next time I read a blog, I hope that it doesnt disappoint me as much as this one. I mean, I know it was my choice to read, but I actually thought youd have something interesting to say. All I hear is a bunch of whining about something that you could fix if you werent too busy looking for attention.
The next time I learn a weblog, I hope that it doesnt disappoint me as a lot as this 1. I mean, I do know it was my option to learn, nevertheless I genuinely thought youd have one thing fascinating to say. All I hear is really a bunch of whining about something which you may repair when you werent too busy searching for attention.
As soon as I observed this website I went on reddit to share some of the love with them.
Merely a smiling visitant here to share the love (:, btw outstanding design and style . «He who will not reason is a bigot he who cannot is a fool and he who dares not is a slave.» by Sir William Drummond.
It’s important to receive a professional carried out ones ears ringing prior to starting healing them. A number of the ringing in the ears can even be indicative of more dangerous troubles. In addition, in the event the examination just isn’t buzzing in the ears, then you’ll need in order to medicate as well as address it in a several way compared to you’d probably ringing in the ears. Most people who have ringing in the ears locate reduced their particular affliction by employing noise therapy. You will find there’s very simple experiment that you could try to see when good treatments will assist you to handle the ears ringing. Track ones radio involving not one but two gas stops. You must find out any noise sound when you’ve got updated the item amongst channels. If your stationary appear with the radio stations goggles a person’s tinnitus or perhaps will make it a smaller amount detectable (somewhat covers this), then noise therapy will probably assist your short lived problem.
It is appropriate time to make some plans for the long run and it is time to be happy. I’ve learn this post and if I may I desire to counsel you some attention-grabbing issues or suggestions. Maybe you can write next articles relating to this article. I desire to read more issues about it!
You made some decent points there. I looked on the internet for the issue and found most individuals will go along with with your website.
I genuinely enjoy reading on this internet site , it has got good articles . «Do what you fear, and the death of fear is certain.» by Anthony Robbins.
I like this web site very much, Its a very nice spot to read and find information. «Do not trust your memory it is a net full of holes the most beautiful prizes slip through it.» by Georges Duhamel.