Forum Moderators: not2easy

Message Too Old, No Replies

How to add a white border to photos

         

reddevil

9:37 am on Apr 26, 2005 (gmt 0)

10+ Year Member



I have Photoshop 7, but am still learning how to operate it. Please could somebody guide me on how to add a white border around the edge (a bit like the old photos, before digital camera days).

Thanks.

benihana

9:40 am on Apr 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



assuming you have one photo opened and its cropped how you want, just goto

image > canvas size

Change the units to pixels and increase the width and height by double the width you want the border to be.

e.g if the photo is 600px by 400px and you want a 4px border all the way round, change it to 608 by 408.

Add a white background layer and your done.

;)

[edited by: benihana at 9:42 am (utc) on April 26, 2005]

limbo

9:40 am on Apr 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Could you enlarge the canvas size then make it white?

/** added - he he, niceone Ben **/

benihana

9:49 am on Apr 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



:)

just thought - is the photo to go on a webpage?

If so you would be better adding the border through css,

e.g.

img {
border:4px solid #fff;
}

or to have a black outline round the white border:

img {
background-color:#fff;
padding:4px;
border:1px solid #000;
}

havent tried second option, does padding work on images...?

reddevil

10:04 am on Apr 26, 2005 (gmt 0)

10+ Year Member



Wowm you guys are too quick for me - I hadn't even boiled the kettle before you answered!

Yup, it is for a website and so css would probably be easier.

I am a bit rusty on css but should I put this code in my main css stylesheet, or direct into the html that brings the photo on each page?

benihana

10:10 am on Apr 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



id stick it in your main css, but as you (probably) have other images that may not require a border, id use a class like:

img.border {

etc
}

then in the html use

<img class="border" src="....

reddevil

10:14 am on Apr 26, 2005 (gmt 0)

10+ Year Member



Cheers for all your help - my site will look cooooool now!

marcn

4:19 pm on May 23, 2005 (gmt 0)

10+ Year Member



Open the image in Photoshop and press "ctrl + a" then "Edit -> Stroke" set the amount of pixels you want and set to either center, inside or outside, press "ctrl + d", save it and your done.
But with multiple images on website you are better of doing it trough CSS.