ThemeLib logo
  • Home
  • Blogger
    • Blogger Templates
    • Blogger Tutorials
    • Blogger Widgets
  • Wordpress
    • Wordpress Themes
    • Wordpress Plugins
    • Wordpress Tutorials
  • Money Makers
  • About
  • Contact
  • Advertise
Home » Wordpress Tutorials

Fix wordpress smilies problem when styling images

This entry was posted by nhc on Monday, August 18th, 2008 at 3:26 pm. It is filed under Wordpress Tutorials and tagged with css, image, smiley, wordpress.

Pictures say a 1000 words. Adding images and style your images are important in your articles in two ways, first they add up in a good look and feel of your article and second it make you gain credibility as an author. But you should be aware of the problem with smileys …

Problem

You might use these CSS code to style images in your entries :
.entry img {
margin:10px;
padding:10px;
border:1px solid silver;
}

Yeah, it is fine. Those code make your images more beautiful, but wait … This would affect your smiley images too! Look at the image below

Wordpress smileys

Your smiley images is added 10px margin, 10px padding, 1px silver border. And therefore it is not good looking :(

How to fix

The smiley images in WordPress are automatically given a CSS class of wp-smiley when they are displayed in a post. You can use this class to style your smileys differently from other post images.

You could add these code to your CSS :
img.wp-smiley {
margin:0px;
padding:0px;
border:0px;
}

That’s all ;)

  • E-mail this story to a friend!
  • Print this article!
  • Digg
  • StumbleUpon
  • del.icio.us
  • Yahoo! Buzz
  • Technorati
  • Mixx

You've read the post. What's next?

If you like this post then please consider subscribing to our RSS feed. You can also subscribe by email to receive free updates directly in your inbox.

Want to know what am I doing? Follow me on Twitter!

Did you miss any of these related posts?

  • WordPress 2.7 Release Candidate 1
  • Wordpress 2.7 Project Icons - Vote Now!
  • WordPress 2.7 Beta 1 Is Out
  • Wordpress 2.6.5 Is Released
  • WordPress 2.6.3 Available for Download

5 Responses to "Fix wordpress smilies problem when styling images"

  1. Samantha says: Subscribed to comments

    simple css stuff but useful for newbies
    thanks

    Reply to this comment »
    October 5, 2008 at 11:00 AM
  2. Don Mega says:

    I ran into a wall trying to fix my smilies themer, wondering why smilies was showing up in some post’s and not in others, first I thought there was a plugin conflict then after brainstoring, or o.k I didn’t brain storm too long, I jumped over to the big “G” and found this useful fix. Thanks Much!

    http://www.megaonlineprofits.com

    Reply to this comment »
    December 11, 2008 at 8:17 AM
  3. Arun Basil Lal says: Subscribed to comments

    Hi there,

    This is the real benefit if Cascading Style Sheet. If you know bit programming, this is called inheritance. The lower classes can inherit from upper classes and yet have its unique identity.
    Without CSS, you have to define style for each element.

    But personally, I prefer to have a zereo margin for my images and if I need margin for specif Image I edit the iamge properties in the post
    Cheers..

    Reply to this comment »
    December 15, 2008 at 4:48 PM
  4. Arun Basil Lal says: Subscribed to comments

    NHC,
    The right sidebars are blank when the post exceeds the range of the sidebar. For eg. The right side of this comment is blank. Can you suggest a fix for that so that the sidebars extend till the bottom irrespective of the content in the sidebar..?

    I have the same problem too.

    Reply to this comment »
    December 15, 2008 at 6:00 PM

Leave a comment

Click here to cancel reply.

RSS feed

Feedburner RSS feed
Most articles on this site are related to blogger templates, wordpress themes, blog design, tips, tricks, and plenty of fun :)

Grab the feed or enter your email address to get the party started! It is FREE.

Search our archives

Categories

  • Blogger Hacks
  • Blogger Templates
  • Blogger Tutorials
  • Blogger Widgets
  • Blogging Tips
  • Favourite Links
  • Google News
  • Make Money Online
  • Personal
  • Reviews
  • Site News
  • Web Stuff
  • Wordpress News
  • Wordpress Plugins
  • Wordpress Themes
  • Wordpress Tutorials

Archives

  • January 2009 (2)
  • December 2008 (17)
  • November 2008 (15)
  • October 2008 (15)
  • September 2008 (11)
  • August 2008 (26)
  • July 2008 (27)
  • June 2008 (16)

Entrecard Blog

Featured Links

  • Joomla Templates
  • Domain Name Registration
  • Slightly mordant
  • Your links here, $10/month

Top Commentators

  • Alex (3)
  • Typhoon (3)
  • brooks (2)
  • Jacques Seoman (2)
  • Make Money (2)

Recent Posts

  • Revolution Themes Became Paid Themes with GPL License!
  • eGamer Wordpress Theme for Video Game Bloggers
  • Google Pagerank Update December 2008 - ThemeLib is now PR6!
  • Viewport Wordpress Theme from Smashing Magazine
  • 50+ “your ad here” 125×125 banners
  • Merry Christmas Everybody!
  • Simple Text Premium Wordpress Theme
  • Wordpress Theme Reviews and Ratings at ThemesPreview
  • How to Find Spam Blogs Republish Your RSS Feeds and Make Good Use Of It
  • Woo Themes Christmas Special - Buy One and Get Three Free!

Popular Posts

  • Arthemia magazine blogger template (290)
  • Google PageRank update September 2008 - My blog got PR5 (108)
  • Maggo magazine blogger template (80)
  • Personal Mag magazine blogger template (66)
  • Astro colorful blogger template (62)
  • White Space blogger template (60)
  • Google Pagerank Update December 2008 - ThemeLib is now PR6! (57)
  • SunRays dark blogger template (40)
  • Windows Vista blogger template (39)
  • Rebel magazine blogger template (38)
  • Revolution Themes Now Available to Download - FREE (37)
  • Link love to Top Commentators :) (36)

Recent Comments

  • Typhoon:nhc posted this news almost a month back.I think you should subscribe to his fe
  • brooks:I am so proud that Google is giving such high PR's to websites
  • brooks:Being a gaming buff, I am so happy that wordpress has come up with this amazing
  • nhc:Search for the code below and change it. body { font-family: Century gothi
  • nhc:You can link to your favorite posts, blog's labels or something you like. It do
  • nhc:I'm sure you did something wrong with the template
  • nhc:Thanks. I'm dreaming of a PR7 too :
  • Yoginder:Thats a very good achievement. All the best and get a P7 or more :
Copyright
Links
© 2008 - 2009 ThemeLib. Some Rights Reserved. Arthemia Theme by MichaelJubel - Enhanced by ThemeLib
About Us | Contact Us | Advertise With Us | Hire Us | Terms of Service | Privacy Policies | RSS Feed | Email Subscription | Sitemap | Log In