0
How do you put a border around an image?
I know I've used this code for many questions, but it's the main one I'm working on. I am trying to find how to get a border around each picture. https://code.sololearn.com/WDTwaYmxnuy3/?ref=app
3 odpowiedzi
+ 4
Check this lesson
https://www.sololearn.com/learn/CSS/1101/?ref=app
+ 2
This should do the trick:
img
{
border-color: black; /*or whatever color you want*/
border-style: solid; /*there are other choices, like dotted and dashed*/
}
However, you might have trouble seeing it. This makes the border thicker so you can see it:
border-width: 5px; /*or whatever size you want*/
You can also try padding:
padding: 5px; /*how far you want the border from the image*/
+ 2
Jianmin Chen thanks!