Remove Border from smiley images in Wordpress

Discussion in 'WordPress' started by Gigacore, Feb 19, 2008.

  1. #1
    A problem arises when you add image borders. An unwanted ugly border will appear around the smiley whenever you or someone inserts it. This can be eliminated by adding a line of CSS code into your theme’s Stylesheet, keeping the image borders intact.

    To remove the border, follow these steps:

    1. Go to your wordpress Admin CP.
    2. Click on Presentation and the select the theme for which you want to add image border.
    3. Click on “Theme Editor”
    4. Open “Stylesheet” or “style.css” whatever from the right hand list.
    5. Now you must be able see the CSS codes.

    Now copy and paste this code in a new line after any “ } “ close tag.

    img.wp-smiley{ border:none;}
    Code (markup):
    This will remove the ugly borders around those smilies keeping image borders intact.

    [​IMG]

    Via: My Blog
     
    Gigacore, Feb 19, 2008 IP
  2. sizzler_chetan

    sizzler_chetan Prominent Member

    Messages:
    7,838
    Likes Received:
    664
    Best Answers:
    0
    Trophy Points:
    390
    #2
    Yep i am already following the step :)
    Have no borders my blog smileys since i started it.
     
    sizzler_chetan, Feb 19, 2008 IP
  3. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Actually what I do is write a global style rule for all images to not only kill the border, but also set the vertical alignment to kill an IE bug.

    
    img {
    	border: 0;			/* this squashes a Firefox bug */
    	vertical-align: bottom;		/* this squashes an IE bug */
    }
    
    Code (markup):
     
    Dan Schulz, Feb 19, 2008 IP
  4. botaksetan

    botaksetan Peon

    Messages:
    21
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Nice information, Thx...

    BR,

    Adi
     
    botaksetan, Feb 19, 2008 IP
  5. plainjane2u

    plainjane2u Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I've tried both fixes suggested and neither will remove the borders from around the smileys.......

    Any ideas?

    Thx

    Jane
     
    plainjane2u, Mar 4, 2008 IP
  6. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #6
    They should, especially mine. Something in your theme must be over-riding the reset then.
     
    Dan Schulz, Mar 4, 2008 IP