Page 1 of 1

Styling for image in List not working

Posted: Sun May 07, 2017 2:59 pm
by Deon

Hi
There seems to be a problem with the styling of images appearing in a list. I am simply styling the images to be round using the following css that is applied to the image.

.profile_image {
border-radius:50%;
margin:10px;
border: 4px;
}

All images in the list display correctly except for the first and last list item as can be seen from the image. As you can notice, the circle is not completed properly. This is strange as it only occurs on the 1st and last record or list item retrieved from the db.

Image


Styling for image in List not working

Posted: Wed May 10, 2017 9:39 am
by Serhii Kulibaba

Hello,

Please check CSS properties:
preborder-top-left-radius/pre for the first item
and
preborder-bottom-left-radius/pre for the last item
They might have bigger priority that yours custom CSS


Styling for image in List not working

Posted: Thu May 18, 2017 5:01 am
by Deon

Hi
All items use the same CSS. How do i set it differently for first and last item if list is populated from database?


Styling for image in List not working

Posted: Thu May 18, 2017 6:31 pm
by Serhii Kulibaba

Please use nth-first-child and nth-last-child CSS clauses for that. Here you can find examples: https://css-tricks.com/useful-nth-chi...


Styling for image in List not working

Posted: Thu Jul 06, 2017 7:52 am
by Deon

Thank you

seems like it only needed... !important

border-radius:50% !important;