27 января 2008 ~ 5156 Комментариев

Простое оформление css блоков

Css

Untitled-1

Хочу поделиться с новичками парой рецептов простейшего оформления тестовых блоков с помощью css.

Закругленные блоки

pic1

Смысл создания просто создаем блок с фоном закругленного уголка, этот блок помещаем в другой блок с закругленным уголком — при совмещении это выглядит как показано на рисунке выше.

Html код блока:


<div class="round-a-gray"><div>Простейший блок с закругленными уголками</div>
</div>

Css код оформления блока:


.round-a-gray {
background:#444444 url(img/round_gray-left.png) left top no-repeat;
color:#FFFFFF;
text-align:center;
} 

.round-a-gray div {
background:url(img/round_gray-right.png) right bottom no-repeat;
padding:4px;
}

Блоки с диалоговым уголком

pic2

Смысл создания этого блока так же прост как и у предыдущего — создаем блок с текстом, помещаем в него еще один блок с фоном уголка который визуально будет располагаться внизу этого блока.

Html код блока:


<div class="tooltips-gray">Самый простой блок с диалоговым уголком<div>
</div></div>

Css код оформления блока:


.tooltips-gray {
background:#444444;
color:#FFFFFF;
text-align:center;
padding-top:4px;
} 

.tooltips-gray div {
background:url(img/tips_gray.png) left bottom no-repeat;
padding-top:4px;
height:18px;
}

Посмотреть демо

Скачать демо

Навеяно http://woork.blogspot.com/2008/03/css-message-box-collection.html

5156 Комментариев для “Простое оформление css блоков”

  1. Sam 27 марта 2008 at 21:08 Permalink

    Недавно делал подобное, только было небольшое дополнительное условие: уголки были в PNG24 с прозрачностью.

    Так вот… Решение не подходит для случая с неоднородным фоном. Хотя для однородного – очень даже.

  2. Я собственной персоной 27 марта 2008 at 21:30 Permalink

    Ну проблему с png можно очень даже несложно решить. Да и еще не отменяли прозрачность гифов :idea:

  3. Zeldar 27 марта 2008 at 22:57 Permalink

    Симпотично.
    Расскажите пожалуйста про эфект HOVER для кнопки POST размещения коментариев, который используеться в вашем блоге.

  4. Я собственной персоной 27 марта 2008 at 23:10 Permalink

    Zeldar, а что там собственно рассказывать, сами посмотрите код и все станет предельно ясно ;)

  5. hyperborean 27 марта 2008 at 23:54 Permalink

    и все-таки он «преогромный»

  6. Я собственной персоной 28 марта 2008 at 0:54 Permalink

    hyperborean хехе, вполне может быть, но для примера пойдет :)

  7. андрэ_0T 28 марта 2008 at 20:41 Permalink

    спасибо, пригодица заюзаем :)

  8. axel 28 марта 2008 at 23:18 Permalink

    Спасибо…. дельные советы!
    Подписываюсь на RSS :)

  9. Zeldar 29 марта 2008 at 22:36 Permalink

    >Zeldar, а что там собственно рассказывать, сами посмотрите код и все станет предельно ясно

    Да уж посмотрел и своровал, гы….Просто тоже самое пытался реализовать через другие библиотеки но в и итоге не корректно работало в IE6 и при котлюченной графике alt не работал, а здесь прямо все как нужно.

  10. stasparshin 30 марта 2008 at 20:33 Permalink

    Спасибо за «для новичков» – полезная штука. И вообще отличный блог!! Подписываюсь.

  11. Mons 4 апреля 2008 at 4:53 Permalink

    Воспользуюсь. Где то то я видел еще способы..

  12. Артур 20 ноября 2008 at 21:04 Permalink

    Сейчас дорабатываю свой проект и обязательно быложу ссылку на Ваш блог! Автор, молодец!

  13. RodgerFox 3 февраля 2010 at 5:45 Permalink

    мне…. надо забыть про картинки html5 и css3

  14. css 1 апреля 2010 at 14:22 Permalink

    прикольные блоки но для хинта они больше похожи ….

  15. kl;kl;kl 24 июня 2011 at 17:10 Permalink

    lk;

  16. Clair Betters 26 февраля 2012 at 7:36 Permalink

    I just want to say I’m very new to blogging and site-building and seriously loved this page. Almost certainly I’m likely to bookmark your blog . You certainly come with really good articles and reviews. Thanks a bunch for sharing your blog.

  17. Holland 29 февраля 2012 at 7:06 Permalink

    Thanks for the instereting articles. I look at clothing/apparel/shoes for color inspiration as well

  18. Julietta 29 февраля 2012 at 7:09 Permalink

    I am often to blogging and i really appreciate your content. The article has really peaks my interest. I am going to bookmark your site and keep checking for new information.

  19. Torri 29 февраля 2012 at 7:34 Permalink

    Absolutely Great! The contexts were very informational and educational. I’ve learned a lot of ideas through this stuff. Thank you!

  20. Best 29 февраля 2012 at 7:46 Permalink

    When I originally commented I clicked the -Notify me when new comments are added- checkbox and now each time a comment is added I get four emails with the same comment. Is there any way you can remove me from that service? Thanks!

  21. Michelina 29 февраля 2012 at 7:56 Permalink

    You really make it seem so easy with your presentation but I find this topic to be really something which I think I would never understand. It seems too complicated and extremely broad for me. I’m looking forward for your next post, I’ll try to get the hang of it!

  22. Tapia 29 февраля 2012 at 7:58 Permalink

    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.

  23. Despina 29 февраля 2012 at 8:31 Permalink

    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.

  24. Strickland 29 февраля 2012 at 8:33 Permalink

    An impressive share, I just given this onto a colleague who was doing a little analysis on this. And he in fact bought me breakfast because I found it for him.. smile. So let me reword that: Thnx for the treat! But yeah Thnkx for spending the time to discuss this, I feel strongly about it and love reading more on this topic. If possible, as you become expertise, would you mind updating your blog with more details? It is highly helpful for me. Big thumb up for this blog post!

  25. Villarreal 29 февраля 2012 at 9:37 Permalink

    Just the article I was hoping to see! Thanks! I discovered your blog site site online and check a number of your early on posts. Keep up the really good operate. I recently additional increase RSS feed to help my Yahoo News Viewer. Seeking forward to reading extra from you down the line!…

  26. male extra review 29 февраля 2012 at 11:30 Permalink

    Do not get Scamed purchasing Male Extra

  27. maleextra review 29 февраля 2012 at 12:14 Permalink

    Male Extra Is known as a totally natural solution for Male Enhancement

  28. Schultz 29 февраля 2012 at 12:33 Permalink

    You really make it seem so easy with your presentation but I find this topic to be really something which I think I would never understand. It seems too complicated and extremely broad for me. I’m looking forward for your next post, I’ll try to get the hang of it!

  29. Rufina Hovnanian 29 февраля 2012 at 15:09 Permalink

    Top slim weight patch,,Preferred slimweight patch,review article of the slim weight patch ,2012 slimweight patch review ,slim weight patchhottestreview,

  30. buy scrapebox list 29 февраля 2012 at 17:33 Permalink

    i joined so several seo forum on the internet and they’re truly quite helpful and i have learned a good deal,

  31. scrapebox proxies 29 февраля 2012 at 17:50 Permalink

    Jane wanted to know though your girl could certain, the cost I basically informed her she had to hang about until the young woman seemed to be to old enough. But the truth is, in which does not get your girlfriend to counteract making use of picking out her very own incorrect body art terribly your lady are generally like me. Citty design

  32. scrapebox proxies 29 февраля 2012 at 18:36 Permalink

    Perfectly composed content material , thankyou for entropy.

  33. site 29 февраля 2012 at 19:46 Permalink

    Some truly nice and utilitarian information on this web site, likewise I conceive the style and design has got fantastic features.

  34. chaussure de foot 29 февраля 2012 at 21:02 Permalink

    Hey, you used to write great, but the last few posts have been kinda boring… I miss your super writings. Past several posts are just a little bit out of track! come on!

  35. how to train a dog 1 марта 2012 at 0:15 Permalink

    Do yoou mind iff I qu0te a few of your articles as long as I provide credit and sources back to your weblog? My blog is in the exact same area of interest as yours and my visitors would definitely benefit from a lot of the information you provide here. Please let me know if this okay with you. Many thanks

  36. camescope hd 1 марта 2012 at 1:08 Permalink

    Its excellent as your other articles : D, appreciate it for posting . «Slump I ain’t in no slump… I just ain’t hitting.» by Yogi Berra.

  37. velo enfant 1 марта 2012 at 1:39 Permalink

    I cherished as much as you’ll obtain carried out right here. The comic strip is attractive, your authored subject matter stylish. nevertheless, you command get bought an shakiness over that you would like be delivering the following. in poor health indisputably come further earlier again as precisely the similar just about a lot incessantly inside case you shield this hike.

  38. reduce car insurance 1 марта 2012 at 1:49 Permalink

    I do not even know how I ended up here, but I thought this post was good. I don’t know who you are but certainly you’re going to a famous blogger if you are not already ;) Cheers!

  39. compensation consulting firm 1 марта 2012 at 1:52 Permalink

    Wow, wonderful blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your website is fantastic, as well as the content!

  40. barbecue electrique 1 марта 2012 at 2:00 Permalink

    Hello there, simply become aware of your weblog via Google, and found that it is really informative. I’m gonna be careful for brussels. I’ll be grateful when you proceed this in future. Numerous other people might be benefited from your writing. Cheers!

  41. Regine 1 марта 2012 at 2:06 Permalink

    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.

  42. Kenia 1 марта 2012 at 2:17 Permalink

    An impressive share, I simply given this onto a colleague who was doing a little bit evaluation on this. And he in truth bought me breakfast as a result of I discovered it for him.. smile. So let me reword that: Thnx for the deal with! However yeah Thnkx for spending the time to debate this, I really feel strongly about it and love reading more on this topic. If potential, as you turn into experience, would you thoughts updating your weblog with extra details? It is highly helpful for me. Huge thumb up for this weblog submit!

  43. Cooper 1 марта 2012 at 2:19 Permalink

    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.

  44. Emely 1 марта 2012 at 2:28 Permalink

    Spot on with this write-up, I truly think this website needs much more consideration. I’ll probably be again to read much more, thanks for that info.

  45. Moyer 1 марта 2012 at 2:35 Permalink

    Excellent read, I just passed this onto a friend who was doing a little research on that. And he just bought me lunch as I found it for him smile Therefore let me rephrase that: Thanks for lunch!

  46. Emeline 1 марта 2012 at 2:46 Permalink

    Excellent read, I just passed this onto a friend who was doing a little research on that. And he just bought me lunch as I found it for him smile Therefore let me rephrase that: Thanks for lunch!

  47. Providencia 1 марта 2012 at 3:01 Permalink

    My daughter bookmarked this link and i also came here accidentally. Thanks a great deal for this post! A real good read. I dont have a lot of time at this time to write a lot of my own opinions, however, if I come back tomorrow evening, I will explain why I must say i dig using this type of article.

  48. Green 1 марта 2012 at 3:11 Permalink

    whoah this blog is great i love reading your posts. Keep up the great work! You know, lots of people are searching around for this info, you could help them greatly.

  49. dog training methods 1 марта 2012 at 3:25 Permalink

    Good ¡V I should certainly pronounce, impressed with your web site. I had no trouble navigating through all the tabs and related info ended up being truly simple to do to access. I recently found what I hoped for before you know it at all.

  50. Ula 1 марта 2012 at 3:58 Permalink

    The tips are great! will try


Оставить комментарий