Another Tutorial for the Semi-Clueless
I have included easy instructions for a variety of border effects to make your lens even MORE spectacular than it already is. Remember, Content is still king, but it doesn't hurt to look pretty.
I have included the code for each border in this lens, just above each example. You can copy and paste, inserting your own image url. I hope you'll understand my explanations enough to make some of your own simple substitutions.
Note: These tricks won't work on the standard photo upload option in the text/write module. Visit Add Photos to Your Lens: A Tutorial for the Semi-Clueless to learn how to add photos.
What Will You Find Here?
- Solid Border
- How Do I Change the Size of the Border?
- Can I Use Other Colors?
- How Do I Choose Colors and Find the Code for Them?
- A Great HTML Color Guide on Squidoo
- Adding Padding
- How Much Padding Should I Add?
- What If I Want Two Colors or a Matted Effect?
- How About a 3-D Effect?
- What If I Don't Want My Border to be Solid?
- What If I Want Different Sizes of Border on Each Side of the Image?
- A Great Book When You're Ready to Learn More
- Let Me Know!
Solid Border
This is the basic code for adding a centered photo to your lens or webpage:
<p align="center"><img src="url of image"/></p>

Buy this and other prints at AllPosters.com
It doesn't take much to add impact to your photo. The example below shows a very thin black line bordering the photo. Note the addition of style="border: 1px solid black to the above code. Style describes things about your image. You will use the style attribute for all of the various borders here. This addition goes before the end tag (/>) for your image. Pay special attention to the quotation marks.
<p align="center"><img src="url of image" style="border: 1px solid black"/></p>

style="border: 1px solid black" specifies size, texture, and color for your border.
Of course, you can still make other changes in the photo when you have borders. In this example, the size of the photo has been changed. Notice the addition of width="300px;".
<p align="center"><img src="url of image" width="300px;" style="border: 1px solid black"/></p>

How Do I Change the Size of the Border?
<p align="center"><img src="url of image" style="border: 3px solid black"/></p>

This border is 20 pixels wide.
<p align="center"><img src="url of image" style="border: 20px solid black"/></p>

How about 80 pixels?
<p align="center"><img src="url of image" style="border: 80px solid black"/></p>

Can I Use Other Colors?
<p align="center"><img src="url of image" style="border: 1px solid purple"/></p>

This color is teal.
<p align="center"><img src="url of image" style="border: 4px solid teal"/></p>

Brown
<p align="center"><img src="url of image" style="border: 20px solid brown"/></p>

Whoa! This example has a number where the color should be. Welcome to the world of the hexadecimal color code. Using this code, you have a nearly unlimited number of color possibilities. In the next section, I'll give you some websites that list gazillions of colors along with their hexidecimal codes.
<p align="center"><img src="url of image" style="border: 60px solid #669933"/></p>

How Do I Choose Colors and Find the Code for Them?
ComputerHope.com HTML Color Codes and Names
HTML-Color-Codes.info HTML Color Code Chart
Immigration-USA.com Complete HTML True Color Chart
December.com Welcome to the Hex Hub (Named Hexadecimal Color Codes for HTML)
WebMonkey.com Color Charts
THESE SITES HAVE INTERESTING COLOR SCHEME GENERATORS
Web Design for Developers HTML Color Combination Chooser
Color Schemer Online v.2
A Great HTML Color Guide on Squidoo
-
HTML Tips for Color
-
Color can be applied via HTML tags to fonts, borders and backgrounds. squidoo.com/basichtml and squidoo.com/advancedhtml show how to implement these colors. This lens however isn't going to show how the code is applied, but is a repository for the...
Adding Padding
<p align="center"><img src="url of image" style="border: 4px solid #cc3300; padding: 5px;"/></p>

Buy this and other prints at AllPosters.com
Maybe you want just a very small amount of padding for a subtle border.
<p align="center"><img src="url of image" style="border: 1px solid #cc3300; padding: 1 px;"/></p>

How Much Padding Should I Add?
<p align="center"><img src="url of image" style="border: 1px solid black; padding: 10px;"/></p>

Maybe a different color would look more like a snapshot.
<p align="center"><img src="url of image" style="border: 1px solid tan; padding: 10px;"/></p>

Increasing the padding changes the effect still more.
<p align="center"><img src="url of image" style="border: 1px solid gray; padding: 20px;"/></p>

You can make your photo look like it's framed.
<p align="center"><img src="url of image" style="border: 4px solid #cc3300; padding: 40px;"/></p>

Same padding, but much narrower border.
<p align="center"><img src="url of image" style="border: 1px solid #cc3300; padding: 40px;"/></p>

Really make that photo stand out with wide border and padding.
<p align="center"><img src="url of image" style="border: 20px solid brown; padding: 60px;"/></p>

Buy this and other prints at AllPosters.com
What If I Want Two Colors or a Matted Effect?
<p align="center"><img src="url of image" style="border: 20px solid olive; padding: 10px; background-color: brown"/></p>

The inner border color is the background color. Determine its size with padding. The outer border color is just your regular border.
Remember, if you want a background color, you have to use padding.
Larger padding with narrower border.
<p align="center"><img src="url of image" style="border: 3px solid black; padding: 30px; background-color: brown"/></p>

Both padding (with background color) and border are wider.
<p align="center"><img src="url of image" style="border: 10px solid black; padding: 50px; background-color: brown"/></p>

How About a 3-D Effect?
Groove, Ridge, Inset and Outset can replace Solid in your image code.
<p align="center"><img src="url of image" style="border: 8px groove olive;"/></p>

You can use groove with padding and background-color too.
<p align="center"><img src="url of image" style="border: 8px groove olive; padding: 15px;"/></p>

Buy this and other prints at AllPosters.com
<p align="center"><img src="url of image" style="border: 8px groove olive; padding: 15px; background-color: brown"/></p>

Ridge is sort of the opposite of groove. Same effect, but "reversed."
<p align="center"><img src="url of image" style="border: 8px ridge olive; padding: 15px; background-color: brown"/></p>

This effect is called inset. It's the same 3-D idea as the examples above, but it's a little simpler. Notice the border has just one color per side. This first example shows how it looks without padding.
<p align="center"><img src="url of image" style="border: 8px inset olive;"/></p>

In this particular case, inset, by itself, is pretty weak.
But if you add padding and background color, it becomes much more effective.
<p align="center"><img src="url of image" style="border: 8px inset olive; padding: 15px; background-color: brown"/></p>

Outset is the reverse of inset.
<p align="center"><img src="url of image" style="border: 8px outset olive; padding: 15px; background-color: brown"/></p>

What If I Don't Want My Border to be Solid?
No problem.
<p align="center"><img src="url of image" style="border: 5px double brown"/></p>

If you add background color, the border looks like this.
<p align="center"><img src="url of image" style="border: 5px double brown; background-color: black"/></p>

You can make your double border any size or color.
<p align="center"><img src="url of image" style="border: 15px double #009933"/></p>

Here is a dotted border. Use dotted in place of solid. You can make the dots any size you want. Once they get much over 5 pixels, dotted borders look more like checkerboard borders, because the dots are square.
<p align="center"><img src="url of image" style="border: 3px dotted black"/></p>

Dashes might be nice. Use dashed.
<p align="center"><img src="url of image" style="border: 3px dashed green"/></p>

Any of these borders can be used with padding and background color.
<p align="center"><img src="url of image" style="border: 6px double black; padding: 30px; background-color: olive"/></p>

What If I Want Different Sizes of Border on Each Side of the Image?
There's a trouble-maker in every crowd.
Do you like my creative border?
<p align="center"><img src="url of image" style="border-top: 10px solid red; border-right: 5px dotted yellow;border-bottom: 5px dashed black; border-left: 30px groove green"/></p>

This looks better, don't you think? A better use of this border trick.
<p align="center"><img src="url of image" style="border-top: 20px solid #C9BE62; border-bottom: 40px solid #C9BE62; border-right: 20px solid #C9BE62; border-left: 20px solid #C9BE62"/></p>

Buy this and other prints at AllPosters.com
A Great Book When You're Ready to Learn More
Head First HTML with CSS & XHTML
Amazon Price: $26.39 (as of 12/10/2009)![]()
List Price: $39.99
This beginners' guide to learning HTML is exactly what you need to get started. Reviews from Amazon buyers have been overwhelmingly positive. You don't need to be an expert already to understand the information in "Head First HTML." This book breaks it down in easy-to-understand pieces. Highly recommended.
Let Me Know!
Let me know if this is helpful. Also tell me if you find a mistake. Thanks.
-
Reply
- KarenKay KarenKay Dec 10, 2009 @ 8:51 am
- I am so glad to find this lens! Thank you for sharing how to do this! 5* & a Fav! Great Job!
-
Reply
- ideadesigns ideadesigns Dec 1, 2009 @ 11:53 am
- Thanks!! Used some border info on my intro module.
-
Reply
- jgelien jgelien Nov 18, 2009 @ 9:13 am
- This is an excellent lens enhancing resource. Thank you for the great information.
-
Reply
- spunkyduckling spunkyduckling Nov 8, 2009 @ 8:24 am
- Cool ideas to enhance pictures. I favorite
-
Reply
- ---Chazz ---Chazz Oct 31, 2009 @ 1:20 pm
- Thanks so much for putting this lens together. Easy to follow and a great resource.
- Load More






