Stay On Top of Crap, Got Some Paper?

Search

XML Feeds

User tools

Blog Co-Op
« How to Find Web Page Cache DateGet More From Your Article Title on Blogs »

How to Place a Border Around Your Images

10/02/09

Permalink 03:28:51 am, by Sheryl Email , 471 words, 3297 views   English (US)
Categories: Blogs

How to Place a Border Around Your Images

I am sure you have seen blog post that have images with the text to the right or left. Some times the text is slammed up next to the picture and makes it look crammed.

I have below a simple code that you can use to to float the picture right or left, place a colored border line around the picture, place a text message under the image, and place a margin between the image and the article text.

You can use the resource code box to pick up the code and put in your own image link, border color, width….


Border:1px – This is how many pixels wide the border line is. To increase the width of the line replace the ‘1’ with a larger number.

Solid#6C2DC7 – This is the HTML number for the color that you would like your border. You can replace this with any HTML Number to match your image. If you want to you can replace the word Solid with Dotted and that will make the border dotted.

Font-size:80% - This will be the size of the Font placed under the Image. In my example the text is ‘Twitter Mouse Rules’. You can replace the 80% to make your text larger or smaller.

Text-align:center – This will place the text ‘Twitter Mouse Rules’ center under the picture.


Twitter Mouse

Twitter Mouse Rules



Float:right – This is used to place the picture to the Right or Left of the page. This is used so you can have the article text to the side of the image.

Margin:5px – This will be how many pixels between the article text and the border of the picture.

Padding:5px – This is how many pixels wide you would like the space between your picture and the border.

Img src= Here you will need to place the link to your original image.

Alt= Here you will want to put a word/words to describe the image. The SEO advantage of using the ALT tag is argued by many, I say it never hurts to have it!

Twitter Mouse Rules – Replace this with any words or saying that you would like people to see under the picture.

If you want the picture to be clickable and lead to another site or page you can use the code that I have in the below example.
Unless you want to lead them to my Twitter page, replace my twitter link after the href=.


I hope this helps you have the perfect image that looks great with your perfect blog post!

You may also want to see -
Using ColorZilla for Fast HEX Color Codes

Placing a Resource Code Box on Your Blog

Picture Code in HTML

Thanks for stopping in.
Be sure to bookmark this page to share with your friends.
Sheryl Loch

3 comments

Comment from: Trey - Swollen Thumb Entertainment [Visitor] Email · http://www.swollenthumb.com
Hi Sheryl. This is good advice, because I can see how a lot of people who are new to blogging might not be familiar with html and css, and may need help to do even seemingly simple things like this. One tip I might add is that if people are using wordpress, to make sure to click on "HTML" and edit their text there, instead of on "Visual"

Recently (10/05/09) Trey - Swollen Thumb Entertainment wrote Free Music Download: Purgatory. Check it out!


10/05/09 @ 20:49
Comment from: Sheryl Loch [Visitor] · http://theinternetmarketersguild.com
Hi Trey,
I'm glad you mentioned the Editor in Wordpress needing to be opened to the HTML.

Since I seldom use WP, I forget that the editor is different than what I use for posting here. So all those using WP - make sure to follow Trey's advice & place your code in while using the HTML not the Visual part of the text editor!

I also tend to put in my code as I write. It's an old habit from using far to many 'bad' editors on social sites. ;)

Recently (10/06/09) Sheryl Loch wrote Weebly for Prosperity Extreme | Prosperity Alliance. Check it out!

10/08/09 @ 11:57
Comment from: Keith@Norman Rockwell Art [Visitor] · http://www.best-norman-rockwell-art.com
This sure looks way simpler and easier than writing all those tables. Can't wait to use it myself. I assume that the code works properly in all browsers and versions. I believe I have a wide variety of visitor browsers hitting my sites.

Really appreciate you sharing this. This code is new to me, so I am excited!

Recently (10/14/09) Keith@Norman Rockwell Art wrote Oct 15, Built Simply By Using SiteBuildIt!. Check it out!

10/16/09 @ 05:07

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)

post snap widget by EdB feed reading by SimplePie