Wordpress-No Border Around Pictures

Posted by Planeta Srbija | 22.9.08 | | 5 comments »

Ifyou don't want to have border around pictures in your post, even if your theme use it, just add folloving string to your specific picture (use HTML view):

<img src="http://www.blogger.com/picture.jpg" style="border: medium none ; padding: 0pt;" alt="Picture" />


There is also another way, use class within picture's HTML:

<img src="picture.jpg" class="no-border" alt="Picture" />


But also add following to your CSS file:

.no-border { border: none; padding: 0; }



To achieve an effect of double borders around your pictures, add this to your CSS:

img, a img {
padding: 3px;
border: 1px solid #01203c;
background: #eee;
}

5 comments

  1. massimo // 5 November 2008 at 03:51  

    hi thanks for the tip it's usefull. I used the method class="no-border" with related entry in CSS but it works just on the single post page! Strangely it does not work on archive.php and other custom pages.

    I use WP 2.6.2 and PRiNZ BranfordMagazine 2.51 (released 2008-04-20).

    Any ideas?
    Thanks anyway
    Massimo

  2. Anonymous // 6 September 2009 at 22:32  

    After looking at numerous ways to remove the border from a specific image (and close to pulling out my hair), your tip was the only one that worked!

    Thank you for posting this very useful information.

    Cheers,
    J

  3. Lionel Myszka // 1 May 2010 at 01:18  

    Thanks for your help!

  4. Anonymous // 10 May 2010 at 19:54  

    You can just click on the image once it's been uploaded into your post/page > advanced > border > 0.

    This does the same thing without needing code.

  5. david // 13 August 2010 at 15:12  

    Thanks man - Ive tried everything. Your first suggestion worked for me but not the second.

Take a look on my other postings: