Borders around photos

Is there a way to place borders around photos within BB or WP, or do I need to always do it before I upload to my library?

Hey Douglas,

That can be done via CSS. Check the link below for more info.
http://www.w3schools.com/css/css_border.asp

Ben

Thanks for the info, Ben.

I did lots of SQL programming as an Oracle database developer years ago, but don’t know much about CSS. The examples from your link all put the CSS code into two functions called p.one, and p.two. Picture 1, and Picture 2 I assume.

I am assuming my code would use the title of the photo as shown in the library?

And then, where does the CSS code go? Can I get to it from Dashboard?

Thanks,
Douglas

Hey Douglas,

You need to target the images and apply the CSS. Images are usually called by the <img> tag. If you’re using the Photo module, you can use the CSS snippet below to apply borders them.

.fl-photo img {
  border: 5px solid red;
}

Where to put them would depend on the theme you’re using. If you’re using the BB theme, you can simply place the code above under Theme Customizer > Code > CSS Code.

Hope this helps!

Ben

So if I understand, I have a photo in my media gallery called “mapdog.jpg”

I could simply go into the theme customizer > Code > CSS Code and add:

mapdog.jpg img {
border: 3px solid #990099;
}

Or is “targeting” the photo something different?

And if I later wanted to change the color or border size, when I called up the theme customizer, would it bring up all my previous entries?

Hey Douglas,

Simply placing the code I have above would apply the border to all images you have when you use the Photo module. Sorry but this is already beyond what we support here. If you need to learn more about CSS, you can check the site below.
http://www.w3schools.com/css/default.asp

In the meantime, you can just apply the borders around your images before you upload them. That works just as well.

Ben

Thanks Ben.

I totally understand. I appreciate you going “above and beyond” what you normally support, and all the help you have given me.

Thanks again,
Douglas

Hey Douglas,

No worries! Have a look through that site, it’s where I learned all my CSS skills from. You can make use of the code I have above as reference as well! Anyway, have fun with BB! :slight_smile:

Ben