Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1473775

    Hello,
    I have 2 color section, the first one should be fixed (always) and I see that on smaller screens and mobile it changes on “scroll” instead of “fixed”, then I need the second color section have the transparent background, in order to shift a background transparent image over the first section.
    I tried to put an id on the second section and define the background transparent but I always see a white background.
    Can you please help me out?
    Thank you

    #1473777

    It would be much easier to give advice if we could see the page it concerns. If there is a link in the private content, you will have to wait for the mods.

    #1473780

    Hey Guenni,
    The website is not published yet. This is a screenshot of the page.
    the second color section begin where you see the horizontal white, and I need it to be transparent.
    The above section has the fixed image.
    Tomorrow I’ll try to publish the website so you can inspect the page.
    Hope this one help you out a bit.
    Thanks

    #1473799

    Hi,

    Thank you for the inquiry.

    How did you apply the border image? Have you tried applying it to the first section instead of the next? Please let us know once the site is live so that we can inspect it properly.

    Best regards,
    Ismael

    #1473825

    Hello Ismael,
    here is the page in question.
    The original image is transparent and I would like that the second color section which has the id “second_section” has a transparent background, so when I scroll the transparent image goes over the first section.
    Next I have another couple of questions:
    – first one is how to fix the first section background always, now I see that on smaller screens and mobile it changes in “scroll”.
    – second one is: is there a way eventually to bring the first section above the second and everything below and keep it fixed?

    Thank you in advance.
    A

    #1473826

    well – remove that second color section and put this to your quick css:

    #top.page-id-238 #av_section_1 { 
      background-image: url(https://substratosfera.it/wp-content/uploads/2024/12/substrato_separatore.png), url(https://substratosfera.it/wp-content/uploads/2024/12/substrato_background_top-1.png);
      background-repeat: no-repeat;
      background-position: bottom left, 100% 0%;
      background-size: 130%, contain;
      background-attachment: scroll, fixed;
    }

    but : if i look to your logo – it might be a good idea to transform the upper part and the lower part as svg to a custom divider ;)
    do you have your logo as verctor based file? – post a link please

    #1473839

    Hello Guenni, perfect, that do the trick I need, useful as always :)
    Thanks for the suggestion about the logo, I’ll keep it in mind, I got it in vector, but it’s a kinda particular activity 3 in 1.
    For sure I’ll ask you for more help during the developing of this website :D
    Thanks again

    #1473843

    Hello again,
    any idea why the fixed top background doens’t work from mobile? example

    If I see it from chrome in smaller version it works, but from mobile it goes on scroll.
    Also the curtain effect on the footer (that works perfectly on other website even from mobile) here it doesn’t work properly and goes on scroll aswell.
    Thanks in advance.

    #1473847

    First: See here a quick takeover of your logo as svg separators – these are set as patterns, so they are not responsive – but fill the entire width with this pattern unit. On element (color section – or column) you can set a height for them. And of course the fill color.

    https://webers-testseite.de/bildvergleich/

    Second: have a look at this: https://webers-testseite.de/donkey/
    The problem with background-attachment: fixed is that a lot of mobile devices do not support it well. So Enfold decided to switch for mobile devices to background-attachment : scroll.

    One trick was to use the background-attachment: scroll from the beginning setup. We can make then a pseudo-container (before or after anyway) that inherited background-image. Because it is now a seperated container we can set it to position : fixed
    We then add a clip path to the actual color section so that the inheriting pseudo-container is only displayed below the parent section.
    This is well supported by all browsers and mobile devices. etc. – follow the link above.

    All is ruled by a custom class for the color-section.

    PS: that post is from 2020 – so it might be that inset (0 0 0 0) works now on all browsers for the clip-path. That is much easier to understand and to write down in css code.

    But: it will be hard to style with two background-images … i’m afraid we’ll have to go back to your previous solution.

    Have a look if this could be a working solution for you – then i will start to explain how:
    https://webers-testseite.de/substrato/

    #1473876

    Hey Guenni, yes that would be perfect, it works exactly how I need.
    I’m all ears :)
    A

    #1473889

    The first color-section : got custom class: bg-fixed
    this color-section got the one background-image: substrato_background_page_topbut set it to scroll (background-attachment)
    this is for quick css ( maybe we had to adjust later on – please activate that example page again):

    .bg-fixed {
      background-size: 0px !important;
      overflow: hidden;
      position: relative;
      -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
      clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    }
    
    .bg-fixed:before {
      background-image: inherit !important;
      background-repeat: inherit !important;
      background-size: cover;
      background-position: inherit;
      content: "";
      position: fixed;
      width: 100%;
      height: 100%;
      top: 0;
      left: 0;
      z-index: -1 !important;
      pointer-events: none;
    }

    Now for the following color-section ( just for that bg-image) with the substrato_separatore.png – that image is 265px heigh –
    On Layout Tab : set section height to “Miniumum custom height in px ” to 265px
    Open “Margin and Padding” Tab : check “Custom Margins” and enter -260px (Top and Bottom) – this will shift the section to top.
    On Styling Tab – “Custom Background Color” and set the slider on the right to minimum (0.01) that is defacto : transparent
    Background Image – now your separator – set to scroll – Bottom Center and repeat-x
    on Advanced Tab : set a higher z-Index e.g. 2 – and give (if needed) a custom class to that section f.e. shifted-bg

    If you got this we will look what to adjust then.
    maybe this might be necessary:

    #top .bg-fixed ,
    #top .shifted-bg {
      position: relative;
    }
    #1473934

    Here I am, sorry for the delay. Activated again the page and set css and stuff as you said. Works perfectly as intended :)
    Thanks Guenni!

    #1473978

    Hi,

    Great! Glad to know that @Guenni007 was able to help you out. Please feel free to open another thread if you have more questions about the theme.

    Have a nice day.

    Best regards,
    Ismael

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘color section transparent over another color section’ is closed to new replies.