Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I create a new element applied to #zone-branding-wrapper. I works but the background image leave a white margin at the top.
What can I do?
Comments
Comment #1
hatuhay CreditAttribution: hatuhay commentedHave to add to a top-padding, the lower the effect greater the padding.
Comment #2
chefnelone CreditAttribution: chefnelone commentedWhat do you mean for top-padding?
Is it a css style? (then it should be padding-top... )
Or is it a configuration? if so where?
Comment #3
hatuhay CreditAttribution: hatuhay commentedSorry if I was not clear.
You have to apply css "padding-top".
Comment #4
Nikolino CreditAttribution: Nikolino commentedI added the top padding but the position of the background doesn't change ... what could be the problem?
Comment #5
chefnelone CreditAttribution: chefnelone commentedSame problem here, padding-top doesn't solve the problem.
Comment #6
chefnelone CreditAttribution: chefnelone commentedComment #7
hatuhay CreditAttribution: hatuhay commentedThe white space is generated by the script used for this effect.
This is not part of the module itself.
Please refer to the script page for a brief explanation and simple examples.
Comment #8
halmsx CreditAttribution: halmsx commentedhad the same problem. so i add overflow:hidden and make the speed slower. its now works. i didnt have to add any padding-top.
Comment #9
lamp5Add in css:
background-attachment: fixed;
Comment #10
hatuhay CreditAttribution: hatuhay commentedComment #11
Beezer75 CreditAttribution: Beezer75 commented#9 fixed the issue for me:
Add in css:
background-attachment: fixed;
Comment #12
chefnelone CreditAttribution: chefnelone commentedThese worked for me:
background-attachment: fixed!important;
overflow:hidden;
Comment #13
knalstaaf CreditAttribution: knalstaaf commentedThe Bootstrap 3 theme provides the option to use a sticky header. But when you're using a banner (that uses the parallax effect) below the fixed header, it would wrongly interpret the offset of the background image (using the same amount as the height of the fixed header).
Could solve it by adding this to my stylesheet (altering the Bootstrap behaviour):
There was an element further down which would still cause this erroneous
background-position
, leaving too much white space above. To get this out of the way I added the following line in the jquery.parallax.js (in theupdate()
function):Comment #14
brickhauser CreditAttribution: brickhauser commented#9 & #11 worked!
Add background-attachment: fixed;
Thanks.