Search…

X3 Photo Gallery Support Forums

Search…
 
Mi.Rog
Topic Author
Posts: 11
Joined: 17 Jan 2017, 15:33

Picture frame

20 Jan 2017, 14:52

Is it possible to change picture frame size and color?
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Picture frame

20 Jan 2017, 23:01

There are no settings for this, but it can easily be achieved with custom CSS. Do you have a link to a page you want frames changes, so I have a reference for the custom CSS code?
 
Mi.Rog
Topic Author
Posts: 11
Joined: 17 Jan 2017, 15:33

Re: Picture frame

31 Jan 2017, 15:14

 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Picture frame

31 Jan 2017, 22:32

1. Go to Settings -> Custom -> custom CSS, add your own .myframe style, and set the width/color as you like:
Code
.myframe figure {
  border: 10px solid #FFFFFF;
  background: #FFFFFF;
}
2. Go to the page Settings -> Gallery, remove the "frame" style:
Image

3. Add your custom "myframe" style instead:
Image

Done.

---

... If you want to set this globally for all galleries, with option to remove on a per-gallery basis, go to main Settings -> Page -> Gallery -> Default Classes, remove "frame" and add "myframe":
Image
 
Mi.Rog
Topic Author
Posts: 11
Joined: 17 Jan 2017, 15:33

Re: Picture frame

01 Feb 2017, 13:29

Thank you  :relaxed:That's it!
 
pede
Experienced
Posts: 60
Joined: 08 Apr 2019, 06:03

Re: Picture frame

09 Jul 2020, 02:44

The CSS myframe style does not affect the border of the videos. How can I change the color and width of the border of videos in the gallery or at least turn it off?
Black border video.jpg
Black border video.jpg (24.2 KiB) Viewed 2000 times
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Picture frame

09 Jul 2020, 06:28

pede wrote: The CSS myframe style does not affect the border of the videos. How can I change the color and width of the border of videos in the gallery or at least turn it off?
Black border video.jpg
Do you have a link for me? Would be so much easier to diagnose, and offer a custom CSS solution if required. Thanks!
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Picture frame

10 Jul 2020, 00:41

pede wrote:The CSS myframe style does not affect the border of the videos. How can I change the color and width of the border of videos in the gallery or at least turn it off?
Black border video.jpg
Videos work a bit different, because they are not contained within the same HTML structure as images. You can use this custom CSS for gallery videos:
Code
.x3-style-frame {
  border: 1px solid #FFFFFF;
  background: #FFFFFF;
}
You can combine the CSS with your existing custom frame style for gallery images:
Code
.myframe figure, .x3-style-frame {
  border: 1px solid #FFFFFF;
  background: #FFFFFF;
}
 
pede
Experienced
Posts: 60
Joined: 08 Apr 2019, 06:03

Re: Picture frame

13 Jul 2020, 02:16

Thanks a lot!
I guess I'll have to take a closer look at CSS sometime. It seems to me to be very interesting with its possibilities.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Picture frame

13 Jul 2020, 04:41

pede wrote:I guess I'll have to take a closer look at CSS sometime. It seems to me to be very interesting with its possibilities.
Indeed. Although it's not always easy to style X3 because the CSS is complex.

In a future version of X3, we will start using CSS Variables, which will make it much easier for users to customize core X3 styles.
https://developer.mozilla.org/en-US/doc ... properties