Заменяем текст на картинку
Хочу подробно описать способ замены текста на картинку, способ самый что не наесть правильный, лидер из подобных способов на сайте «Css Tricks».
Заменить слово на картинку это отличный способ совместить и красоту оформления, и поисковую оптимизацию. К примеру, заменить заголовок в самом верху страницы, допустим, «Пластиковые окна» на ваш логотип или этот же текст, только графически.
Это будет радовать глаз Вашего посетителя! :-)
Принцип способа
Мы размещаем заголовок со встроенным в блоком с фоном(нужной нам картинкой) который будет накладываться поверх заголовка.
Приемущества этого способа:
- При отключенной графике с включенным css будет виден заголовок.
- При отключенном css так же будет виден заголовок.
Техническая сторона
<h1 class="technique-eight">
<span></span>Компания "Поющие выдры"
</h1>
h1.technique-eight {
width: 350px; height: 75px;
/* Размеры нужного нам блока */
position: relative;
}
h1.technique-eight span {
background: url("images/header-image.jpg");
/* Наша картинка */
position: absolute;
width: 100%;
height: 100%;
}
Приводить пример данного способа я не счел нужным ибо и так все предельно понятно. Всем моим читателям приятного дня ;-)

Спасиб. Попробую.
А еще лучше добавить
к h1.technique-eight {… overflow:hidden} чтобы при увеличении шрифта снизу ничо не полезло. Ну и оформление задать при отрубленной картинке нормальное :)
В вся «соль» и была в отсутствии overflow:hidden и прочего. А как задать оформление при отрубленной картинке?
Ну я допустим делаю так.
.a-title {position:relative; color:#bf0; font:22px Georgia; text-transform:uppercase; overflow:hidden}
.a-title span {position:absolute; top:0; left:0; width:100%; height:100%}
Подбираю максимально похожий шрифт. Вот один из примеров radioba.by
Или если зайти на new.onliner.by и отрубить графику, то можно увидеть что логотип практически идентичный.
Конечно такая техника не проходит когда у нас все в градиентах :(
Игорь, это действительно тоже очень интересный способ, думаю моих читателей так же заинтересует ваш способ.
Это тот-же способ что ты привел. Просто в твоем способе не учтено то что шрифт может увеличиваться. А следовательно вылазить за фоновую картинку.
Я так понимаю семантичного решения не существует? Без пустых тэгов.
Существует, но они мение удобны. Да и пустые теги не так уж и страшно.
Для IE без экстра-разметки не обойтись (или без expression), а для современных браузеров можно использовать псевдо-класс :before и свойство content. Есть статья по теме –http://tinyurl.com/6hs4x9
А alt тогда на что?…
Чего? Чего?
Alt – для изображений являющихся контентом. А замена текста нужня для декоративных целей – для украшения. Разделение контента и оформления, понимаешь.
Все правильно сказали! :-)
вообще-то, для этого предназначен альт. учите хтмл.
Альт не виден при отключенный картинках, поймите это.
Интересный способ, надо бы попробовать!
Тоже думал использовать такой метод, но с точки зрения поисковой оптимизации все ли будет корректно?
Все будет отлично!
А как сделать наоборот?
Сверху картинка, снизу текст?
При клике на картинку, слои меняются местами…
Без пустых тегов нужно поставить css свойство text-indent:-9999px;
I simply want to tell you that I’m newbie to weblog and definitely liked your website. More than likely I’m want to bookmark your website . You definitely come with beneficial article content. Thanks a lot for sharing your website page.
Your place is valueble for me. Thanks!…
You should take part in a contest for one of the best blogs on the web. I will recommend this site!
love a lot of the stuff especially the cute design
Forgot to ask this, who did the art for the homepage? That drawing style seems familiar.
Aw, this was a really nice post. In idea I would like to put in writing like this additionally – taking time and actual effort to make a very good article… but what can I say… I procrastinate alot and by no means seem to get something done.
Aw, this has been a really nice post. In plan I would like to put in writing similar to this additionally * taking time plus actual work to make a very good article… but exactly what do I say… My spouse and i procrastinate a large amount and by virtually no means apparently get something perfo
Nice post. I learn something more challenging on different blogs everyday. It will always be stimulating to read content from other writers and practice a little something from their store. I’d prefer to use some with the content on my blog whether you don’t mind. Natually I’ll give you a link on your web blog. Thanks for sharing.
Top Male Extra Web site
Top Male Extra Web site
Finest slim weight patch,,Preferred slimweight patch,report of the slim weight patch ,2012 slimweight patch review ,slim weight patch newest review,
Nice read, I just passed this onto a colleague who was doing a little research on that. And he actually bought me lunch because I found it for him smile So let me rephrase that: Thanks for lunch! «To be 70 years young is sometimes far more cheerful and hopeful than to be 40 years old.» by Oliver Wendell Holmes.
Outstanding slim weight patch,,Leading slimweight patch,examination of the slim weight patch ,2012 slimweight patch review ,slim weight patchmost innovativereview,
An incredibly fascinating go via, I may possibly not concur entirely, nonetheless you do make some really legitimate factors.
Thank you for sharing excellent informations. Your website is so cool. I’m impressed by the details that you?ve on this web site. It reveals how nicely you perceive this topic. Bookmarked this web site page, will come back for more articles. You, my friend, ROCK! I found just the info I already searched all over the location and just could not come across. What a perfect site.
I like this weblog it’s a master piece! Glad I noticed this on google.
But an additional intelligent weblog! Completely cannot wait for a great deal much more!
Its like you read my thoughts! You appear to understand so much about this, like you wrote the ebook in it or something. I believe that you simply can do with a few p.c. to force the message house a little bit, but instead of that, this is wonderful blog. A great read. I will definitely be back.
I don’t normally comment but I gotta say regards for the post on this perfect one : D.
Doo y0u mind 1f I quoote a couple of your articles as long as I provide credit and sources back to your weblog? My blog site is in the very same area of interest as yours and my users would certainly benefit from some of the information you present here. Please let me know if this okay with you. Thanks a lot
You made some clear points there. I did a search on the issue and found most persons will go along with with your blog.
Wow, fantastic blog structure! How long have you been running a blog for? you made blogging look easy. The whole glance of your website is fantastic, as smartly as the content!
excellent points altogether, you just received a brand new reader. What may you recommend about your submit that you simply made a few days in the past? Any certain?
Bom dia galera, com certeza disparar um torpedo internet gratuito está cada vez mais difÃcil devido ao bloqueio das operadoras de celular. Há ainda os websites que prometem entregar meu SMS mas quase nunca chegam ao usuário final. Alguns como o Mundo oi e o Oi Torpedo funcionam mas e para as outras operadoras? E os que dizem que mandam e nada chega. Para onde está indo as meus torpedos? E para a Tim, Vivo? Alguma Idéia? Ou significa ter de pagar?. É só um desabafo, realmente está difÃcil achar bons sites para mandar SMS grátis.
very nice post, i certainly love this website, keep on it
Hey There. I discovered your blog the usage of msn. That is a really smartly written article. I’ll make sure to bookmark it and come back to read more of your helpful info. Thanks for the post. I’ll definitely return.
Its like you read my mind! You appear to know a lot about this, like you wrote the book in it or something. I think that you can do with a few pics to drive the message home a little bit, but instead of that, this is fantastic blog. A great read. I will certainly be back.
You should take part in a contest for one of the best blogs on the web. I will recommend this site!
Hey there! This is type of off idea but I necessity most assist from an established blog. Is it difficult to set up the own blog? I’m not quite techincal but I can figure points out very fast. I’m thinking about creating my own but I’m not sure the place to start. Do you possess any guidelines or suggestions? With appreciate
I simply want to say I am just beginner to blogs and truly enjoyed your web page. Most likely I’m going to bookmark your blog post . You amazingly have wonderful writings. Appreciate it for revealing your blog site.