Is there a way how to add a background to the slideshow? If so, what is the correct path to e.g. ./userfiles/images/slideshow/background.jpg? May the background be defined in e.g. template/stylesheet.css?
So far there is one slide replaced by an empty container.
Slideshow_XH
Moderator: Tata
Slideshow_XH
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
Re: Slideshow_XH
Create folder and file: ./plugins/slideshow/css/stylesheet.css with content:
or in your template stylesheet.css
In a site:
Or accordingly to the template.
Code: Select all
.slideshow_1_container {
background: url(../../../userfiles/images/slideshow_1/background.jpg) 50% 50% no-repeat #333;
background-size: cover;
width: 100%;
}
#slideshow_1 {
border: 50px solid transparent;
box-sizing: border-box;
}
Code: Select all
.slideshow_1_container {
background: url(../../userfiles/images/slideshow_1/background.jpg) 50% 50% no-repeat #333;
background-size: cover;
width: 100%;
}
#slideshow_1 {
border: 50px solid transparent;
box-sizing: border-box;
}
Code: Select all
<div class="slideshow_1_container">{{{slideshow('slideshow_1');}}}</div>
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“ Ludwig's XH-Templates for MultiPage & OnePage
Re: Slideshow_XH
Thanks, it works.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
Re: Slideshow_XH
Well, the only way of solving the slideshow appearence was use of viewport units "vw, vh". See the result at http://ukastelana.cmsimple.sk and test it with any device or device emulator.
Adwantage is that I can use the unit "vw" - ViewportWidth both for the width and height element and thus keep the aspect ratio of an image.
e.g. The image of 800x600 has the aspect ratio equal 4:3. Using the viewport units can be set based on the width.
1vw = 1% of ViewportWidth
If I am depending on the width of my alocated design space, I set
If I am depending on the height of my alocated design space (almost never), I can set
There is still a way to combine these units with their alternatives - browsers not understanding
There is only one disadvantage of these units - they are not supported by all browsers. Read more http://caniuse.com/#search=viewport%20units.
But considering the percentage of accepting browsers use, I probably will step into the line of supporters, who try to learn visitors to keep up with new versions of browsers, instead of wasting time by making stylesheets for dinosauria browsers. I am often called by colleagues to show them this and that on their computers and I see how lazy or incompetent they are in keeping installed software up-to-date. Some applications don't necessary need any update. But browsers are mostly worth to keep up.
Adwantage is that I can use the unit "vw" - ViewportWidth both for the width and height element and thus keep the aspect ratio of an image.
e.g. The image of 800x600 has the aspect ratio equal 4:3. Using the viewport units can be set based on the width.
1vw = 1% of ViewportWidth
If I am depending on the width of my alocated design space, I set
Code: Select all
.img{
width: 80vw; /* 80% of ViewportWidth */
height: 60vw; /* height respecting the image aspect ratio 3:4 */
}
Code: Select all
.img{
height: 60vh; /* 60% of ViewportHeight */
width: 80vh /* width respecting the image aspect ratio 3:4*/
}
There is only one disadvantage of these units - they are not supported by all browsers. Read more http://caniuse.com/#search=viewport%20units.
But considering the percentage of accepting browsers use, I probably will step into the line of supporters, who try to learn visitors to keep up with new versions of browsers, instead of wasting time by making stylesheets for dinosauria browsers. I am often called by colleagues to show them this and that on their computers and I see how lazy or incompetent they are in keeping installed software up-to-date. Some applications don't necessary need any update. But browsers are mostly worth to keep up.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
Re: Slideshow_XH
Please try without these additions, but this fix for Slideshow_XH.Tata wrote:Well, the only way of solving the slideshow appearence was use of viewport units "vw, vh".
Christoph M. Becker – Plugins for CMSimple_XH
Re: Slideshow_XH
Ich versuche es local, weil ich schon das ganze bereits fertig habe, nur noch einige Übersetzungen und die Speisekarten aktualisieren. Ich musste aber die Tempmlates für jede einzelne Seite einstellen. Im content.htm war es eigentlich ganz einfach. Jetzt ist die Seite hochgeladen.
Nur ein winziges Bug habe ich im stzlesheet - einige Links zeigen die Rahmung doppelt ung bei Bilder (Newsboxe im footer) ist eine der Rahmung nur 1 Zeile hoch. Ist aber keine Ursache.
Vielen Dank an alle, die mir mit den Rätsel geholfen haben. Wieder etwas zugelernt. Noch einige Jahre und ich werde ein gute Anfänger .
Nur ein winziges Bug habe ich im stzlesheet - einige Links zeigen die Rahmung doppelt ung bei Bilder (Newsboxe im footer) ist eine der Rahmung nur 1 Zeile hoch. Ist aber keine Ursache.
Vielen Dank an alle, die mir mit den Rätsel geholfen haben. Wieder etwas zugelernt. Noch einige Jahre und ich werde ein gute Anfänger .
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.