Magznetwork RSS Feed
Subscribe

Subscribe RSS Feed
Subscribe Email

CSS Tutorial: Adding border line for the images in blog posts

2 July 2008 Add comments

This post is special for Ilyas Kazi.

Adding border line for the images is very easy. You only need simple CSS technique. The basic CSS for this case is,

img {
padding:5px;
margin:5px;
border-width: 5px;
border-color: #0066CC;
border-style: single;
}

Feel free to modify parameters in the CSS code above. There are many different “border-style” parameter. Which one do you like?

CSS - Border Style

The CSS code above will be applied to all of your images in your web pages. To give border line only for the images in your blog posts, you have to read the implementation for both Wordpress and Blogger below.

Wordpress

.post img {
padding:5px;
margin:5px;
border-width: 5px;
border-color: #0066CC;
border-style: single;
}
img.wp-smiley {
background: none;
padding: 0;
margin: 0;
border: 0;
}

Add the code to style.css file in your current wordpress theme directory.

Blogger

.post img {
padding:5px;
margin:5px;
border-width: 5px;
border-color: #0066CC;
border-style: single;
}

Go to Layout - Edit HTML. Add the code to your blogger template (XML) exactly before ]]></b:skin>

If you like this post then please consider subscribing to our MagzNetwork RSS feed. You can also subscribe by email and have our news sent directly to your inbox.

Blogger, Blogger Hacks, Wordpress, Wordpress Tutorials
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Facebook
  • TwitThis
  • bodytext
  • del.icio.us
  • StumbleUpon
  • Propeller
  • Technorati
  • Sphinn
  • Reddit
  • Google
  • Live
  • YahooMyWeb
  • BlinkList
  • Slashdot
Rate this:
2.5
Blogger in Draft: Inline Comments for Blogger Blogs iTheme Techno Blogger Template v2.0 released
SUPPORTS ARE AVAILABLE AT MAGZNETWORK FORUM

4 Responses to “CSS Tutorial: Adding border line for the images in blog posts”

  1. DJHassoo
    #1

    Thank You im sure this post will help me in my new blog http://www.wahgwah.com there is almost 70% post fully loaded with images

    no image (Who am I?)
    Rate this:
    2.5
  2. Ilyas Kazi
    #2

    Thank you very much for your Great work!!

    no image (Who am I?)
    Rate this:
    2.5
  3. apottemep
    #3

    Thanks for the post

  4. http://www.css-edge.blogspot.com/
    #4

    Great post, thaaaaaaaaaanks alot.
    http://www.css-edge.blogspot.com

    no image (Who am I?)
    Rate this:
    2.5

Leave a Reply






XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Links to this page

No link.




Magznetwork RSS Feed
Subscribe

Subscribe RSS Feed
Subscribe Email