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

23rd Feb 2020, 2:39 PM
Aiki
Aiki - avatar
3 Antworten
23rd Feb 2020, 2:52 PM
Cmurio
Cmurio - avatar
+ 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*/
23rd Feb 2020, 2:43 PM
Jianmin Chen
Jianmin Chen - avatar
+ 2
Jianmin Chen thanks!
23rd Feb 2020, 2:45 PM
Aiki
Aiki - avatar