comprar viagra online
comprar viagra generico barato
comprar cialis generico online
comprar cialis online seguro
Styling a chat conversation with text balloons |
As you can see in my last article (a chat conversation with Janko Javonovic), the article is nicely styled in a real "chat conversation" way. This is achieved by placing the text in text (or speech) balloons, using avatars and making it look pretty fancy. Like I already said in that article, I wanted to share how you can create such a nicely styled chat conversation with text balloons using CSS3. You can show your interviews or chat conversations online in a pretty way, making it more visually attractive.
IMPORTANT NOTE: Get your CSS editor ready so you'll be able to re-create this cute effect for your site! HTML As usual, the HTML isn't that hard to understand. Copy the following code and repeat it to extend the conversation. <div class="reporter"> <p>Lorem ipsum dolor sit amet, ...</p> </div> <div class="reporter-ico"> <img src="images/reporter.png" alt="" /> </div> <div class="interviewee"> <p>Nam condimentum. Cras eros nisl, ...</p> </div> <div class="interviewee-ico"> <img src="images/interviewee.png" alt="" /> </div> Just to clear some things up:
Well, that wasn't that spectecular, was it? Now let's fancyfy that HTML with some nice CSS(3)! CSS3 Take not that this is not the complete CSS file, just the important stuff. Make sure you check out the source code by downloading this project to view the full CSS. I'll break this up in seperate parts. .reporter { width:450px; float:right; background-color:#000018; color:#D8D8D8; font-style:italic; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; background-image:url(../images/glow.png); background-position:top center; background-repeat:no-repeat; text-align: justify; }
.reporter-ico { clear:both; float:right; width:100px; background-image:url(../images/reporter-balloon.png); background-repeat:no-repeat; }
.interviewee { width:450px; clear:both; background-color:#304860; color:#D8D8D8; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; background-image:url(../images/glow.png); background-position:top center; background-repeat:no-repeat; text-align: justify; }
Clearing the floats Floating can be pretty tricky sometimes. When you "forget" to clear your floats, the layout may look really weird in your browser. Since we're floating the .clear { clear:both; } And clear directly after <br class="clear" /> That's about it! I also added a Conclusion and download Looks pretty nice, doesn't it? Sadly, like I said, Internet Explorer doesn't support this form of CSS3 (yet), so it can't be used as a cross-browser solution. You can also change the "glow.png" image if you don't want a glow, but (for example) a hard border. I hope that you like this tutorial and that you learned something today. I would love to see if you're going to implement this somewhere. If you do, please tell us! Tags: css3 text balloons speech balloons interview chat conversation Interested in this topic? You might enjoy another article I've written called |
< Prev | Next > |
---|
Search |
---|
Or try the sitemap |