Non-scrolling banner with maincontents scrolling over it
11 months 5 days ago #70740
by JEMO
Non-scrolling banner with maincontents scrolling over it was created by JEMO
Dear all,
Working with a template created with TemplateCK, I am unable to create what I want, and I am hoping you can help.
The template starts with a header_wrapper, in which there is a bannerrow that holds the logo and the menu. This combo has to stay on all pages, and functions as it should.
Below that, there is the main_wrapper. This starts with a page wide block. This block is located before the maincontent. Now I want the maincontent to scroll over the block, where the content of the block is not scrolling. The content of the block depends on the page, so AFAIK it cannot be defined in the template, but needs to be filled in Joomla. Currently the block is filled with an image per page. This is done by putting each image in a separate custom module. These are assigned to specific menu items.
So I have the images on their respective pages, below the logo/menu and before the maincontents, but it scrolls along with the maincontents. How can I change this behaviour? I've already tried to change this by using position tags, but I do not get it working.
Any help would be quite appreciated!
Kind regards,
JEMO
Working with a template created with TemplateCK, I am unable to create what I want, and I am hoping you can help.
The template starts with a header_wrapper, in which there is a bannerrow that holds the logo and the menu. This combo has to stay on all pages, and functions as it should.
Below that, there is the main_wrapper. This starts with a page wide block. This block is located before the maincontent. Now I want the maincontent to scroll over the block, where the content of the block is not scrolling. The content of the block depends on the page, so AFAIK it cannot be defined in the template, but needs to be filled in Joomla. Currently the block is filled with an image per page. This is done by putting each image in a separate custom module. These are assigned to specific menu items.
So I have the images on their respective pages, below the logo/menu and before the maincontents, but it scrolls along with the maincontents. How can I change this behaviour? I've already tried to change this by using position tags, but I do not get it working.
Any help would be quite appreciated!
Kind regards,
JEMO
Please Log in or Create an account to join the conversation.
11 months 4 days ago #70754
by ced1870
Joomlack Webmaster and Developer
Replied by ced1870 on topic Non-scrolling banner with maincontents scrolling over it
Hi
I'm trying to understand
if yes, this shall be done using a background image. Give me the url of your page so that I can check and confirm that I have understood the request please
CEd
I'm trying to understand
do you want a parallax image ? image fixed and the rest of the page scrolling ?I want the maincontent to scroll over the block,
if yes, this shall be done using a background image. Give me the url of your page so that I can check and confirm that I have understood the request please
CEd
Joomlack Webmaster and Developer
Please Log in or Create an account to join the conversation.
11 months 3 days ago #70775
by ced1870
Joomlack Webmaster and Developer
Replied by ced1870 on topic Non-scrolling banner with maincontents scrolling over it
I have received your email. you can try something like that
Update the html code of your custom module like that :
and add the custom css in your page :
Update the html code of your custom module like that :
Code:
<div style="position: relative;height: 30vw;"><img src="/images/headers/EKK.Best.20230513.monochrome.PaulKeizer.5852x1790.jpg" style="position: fixed;" width="5852" height="1790"></div>
and add the custom css in your page :
Code:
#block1 {
position: relative;
z-index: -1;
}
#row1, #maincontent, #row2 {
background: white;
}
Joomlack Webmaster and Developer
The following user(s) said Thank You: JEMO
Please Log in or Create an account to join the conversation.
11 months 3 days ago - 11 months 3 days ago #70777
by JEMO
Replied by JEMO on topic Non-scrolling banner with maincontents scrolling over it
Too bad; still no parallax effect
(but thanks for trying to help me out)
I earlier tried the position to be relative with a z-index of -1, but I did not include a value for height. I was - at that time - indeed wondering how I could give the banner image a height, so that is a good one. However, I wonder whether it was you intent to make the height of the image equal to 30% of the viewports width (30vw); that can create interesting results, I'd say.
I am also not sure whether I have added the custom CSS in the correct place. In Template Creator CK I added that to the Custom CSS that is available when pressing the </> Code button on the left. Is that where you were pointing me to?
I earlier tried the position to be relative with a z-index of -1, but I did not include a value for height. I was - at that time - indeed wondering how I could give the banner image a height, so that is a good one. However, I wonder whether it was you intent to make the height of the image equal to 30% of the viewports width (30vw); that can create interesting results, I'd say.
I am also not sure whether I have added the custom CSS in the correct place. In Template Creator CK I added that to the Custom CSS that is available when pressing the </> Code button on the left. Is that where you were pointing me to?
Last edit: 11 months 3 days ago by JEMO.
Please Log in or Create an account to join the conversation.
11 months 3 days ago #70778
by ced1870
Joomlack Webmaster and Developer
Replied by ced1870 on topic Non-scrolling banner with maincontents scrolling over it
the html code of your module is not what I proposed
and the custom css file has illegal characters : single quote is not a valid css comment :
developer.mozilla.org/en-US/docs/Web/CSS/Comments
(the place in Template Creator CK is ok)
and the custom css file has illegal characters : single quote is not a valid css comment :
developer.mozilla.org/en-US/docs/Web/CSS/Comments
(the place in Template Creator CK is ok)
Joomlack Webmaster and Developer
The following user(s) said Thank You: JEMO
Please Log in or Create an account to join the conversation.
11 months 3 days ago #70779
by JEMO
Replied by JEMO on topic Non-scrolling banner with maincontents scrolling over it
Apologies! I missed the style="position: fixed;" in the img. Now it at least does not move anymore. Great. I will continue to improve this.
Please Log in or Create an account to join the conversation.
Time to create page: 0.235 seconds