1 reply [Last post]
ProPokerUK
ProPokerUK's picture
Offline
Regular
Reading, UK
Last seen: 33 weeks 5 days ago
Reading, UK
Timezone: GMT+1
Joined: 2017-11-05
Posts: 11
Points: 18

Hi

How do I place a border around an image on my page ?

I'm trying to create the page with a box-based layout.

Cheers

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 18 hours 20 min ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9715
Points: 3791

css

If it's all images,

img {
    border: 1px solid black;}

If it's a number of but not all images, use the class attribute:

img.featured {
    border: 1px solid black;}

If it's a single image, use an id attribute:

img#featured {
    border: 1px solid black;}

Or, you may use the cascade from an ancestor.

This is basic stuff, so dig into your learning resources.

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.