The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Image border help
69urkle69
post Jul 8 2016, 10:47 AM
Post #1





Group: Members
Posts: 2
Joined: 8-July 16
Member No.: 24,400



Hi there. I'm new to coding and having trouble with an image border. When i enter in my code the picture shows up with a border, however the border is behind the picture. The picture is sitting on top of the border and not being enclosed in it. Here's the code i'm using including the css.

.image {
margin: 40px 30px 0px 0px;
border: 15px solid black;
border-radius: 100px;
float: left;
}

<div class="image">
<img src="http://i.imgur.com/GW3OTwCm.jpg?1"/></div>

I also have image links on the page to social media sites. If i change the css to img {} it creates the correct border on the picture but it also effects all of the other images including the links. I just want the original picture to have a border.

Any help would be appreciated

Thanks
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 8 2016, 01:36 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Use a smaller border-radius or add some padding to the picture. I think 25px border-radius looks good. Or if you keep the 100px border radius 25px padding all around will keep the whole image inside the border.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
69urkle69
post Jul 8 2016, 09:18 PM
Post #3





Group: Members
Posts: 2
Joined: 8-July 16
Member No.: 24,400



That works. Thanks very much
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 25th April 2024 - 09:43 AM