Page 1 of 1

rounded corners for folders only

Posted: 30 Mar 2023, 05:55
by petri71
Hi,

I am trying to get rounded corners on folders only,

I found the image-container class but it also set for images in galleries.

Is there a way to touch Folder only ?

Thank you in advance for your answer

Re: rounded corners for folders only

Posted: 30 Mar 2023, 09:43
by mjau-mjau
These things will depend slightly on how you want it. If you are already using a frame, the border-radius would either affect the frame only or only the image inside. A border-radius to a single element wouldn't be able to affect both the frame and the image. It's likely in this case you would want the border-radius on the frame element. It could also depend on what type of layout you are using, as some layouts include captions within the element.

Anyway, in general you could try something like this:
Code
.folders figure {
  border-radius: 10px;
}

Re: rounded corners for folders only

Posted: 30 Mar 2023, 12:27
by petri71
oh ok, so you mean that I cannot have a rounded folder with rounded frame ?

I could live without. 

But I was planing on having the title in caption inside the element. wouldn't it be possible ?

this is what i am trying to reach :

https://petri-de-pita.smugmug.com/Stories

Re: rounded corners for folders only

Posted: 31 Mar 2023, 00:19
by mjau-mjau
petri71 wrote: oh ok, so you mean that I cannot have a rounded folder with rounded frame ?
You can. But the image inside will be square. If you find an example of galleries with frames AND rounded corners, you will see what I mean.
petri71 wrote:But I was planing on having the title in caption inside the element. wouldn't it be possible ?
It's possible by using the "caption overlay" option in folder settings.
petri71 wrote:this is what i am trying to reach :
https://petri-de-pita.smugmug.com/Stories
Yep. Keep in mind the above doesn't use frames. If it did, it would affect the frame while the image inside remains square, and it will look slightly odd ... Just warning you up front, as I have come up against this a few times.

Re: rounded corners for folders only

Posted: 31 Mar 2023, 04:11
by petri71
ok thank you I get the frame problem.

I deleted all frame options in the settings and in CSS I added your .folders figure  but it doesn't work :

http://www.coquille.org/x3/cellpix/

what am I doing wrong ?

Re: rounded corners for folders only

Posted: 31 Mar 2023, 09:10
by mjau-mjau
The border-radius could be applied to different elements. In this case, when applying to the <figure>, you must use overflow: hidden so that it affects elements inside the <figure>:
Code
.folders figure {
    border-radius: 10px;
    overflow: hidden;
}

Re: rounded corners for folders only

Posted: 31 Mar 2023, 11:13
by petri71
oh great !

it works !

http://www.coquille.org/x3/cellpix/

thank you !!!