We designed a website in photoshop and now I’m trying to convert the design to a WordPress template. This is all going well, except for one thing. I’m not sure how to create this kind of border for my images. Could this be done by using a css/jquery trick? We created a border over the image. I’ve attached an image as an example.
The background around the image has different colors.
2
Answers
You can use the CSS3 border-image property for this: http://www.w3schools.com/cssref/css3_pr_border-image.asp
Here’s the css you’re probably looking for:
Edit: Another option would be to overlay the border over the image:
If you need the border to automatically apply overlay on the image you could make the border a .png and use divs to layer them. See this example here: http://jsfiddle.net/sqJtr/961/
Basically you have two divs, the main image and the overlay. The main image is what the client would upload to:
The overlay image is the frame .png file you yourself add:
This is just one option for how to get this done. Using this method the images do have to be a uniform size so this may not help you get the result you’re looking for.