Gap between Smart Slider and Header Menu
-
I went through 10 ww.wp.xz.cn posts and nothing worked for me. I have adjusted padding & margins added CSS (now removed), that I got on this forum and still nothing? Anyone want to give it a shot?
The issue is global site issue
The page I need help with: https://www.anthonychristianproductions.com/
The page I need help with: [log in to see the link]
-
This issue is not related to Smart Slider, but rather your containers where the slider happens to be added.
The issue is that there is spacing set on the containers, which results in those empty spaces.
See the attached images:
https://www.dropbox.com/scl/fi/yjxwfd3sv9i5wo25yithl/padding.png?rlkey=nqg7o1zipjd46z1lln0l4eslj&st=ygbrimat&dl=0
https://www.dropbox.com/scl/fi/a1vl2gr6ultl9z6uorymz/margin.png?rlkey=kpd8x0jyecx8vfmmen68mbh1f&st=wsld1x8e&dl=0So if you would like to remove these extra spacing, you should find them added in the page builder, and remove them. If you cannot find them there, it is possible your theme adds these inline by default, in which case you can try and look for a theme setting that could be toggled to disable it. You could also override those styles with custom CSS, by setting the margin/padding to 0 on those elements, however please note that custom styling and custom coding in general is outside the scope of our support.
What you have highlighted are you suggesting that I change the 60 padding and spacing be changed to some other number to get the desired spacing and are you saying that this is a default (obviously) and cannot be changed from your code screenshot you sent to me? Thank you
Are you suggesting that CSS would probably be the best way to go? Funny someone on ww.wp.xz.cn forum said it was your smart slider was the cause. Funny how people like to play tennis with issues. Thanks for all your help and insights. Fred
Hi @freddyboy377!
That spacing is a combination that comes from your theme and Gutenberg page builder. Gutenberg allows theme developers to define a global default spacing in their codes, which is the “–wp–preset–spacing–⦔ value. In your case your theme defined 70px for that (so the 60 is just in the name, but your theme defined 70px for it), and it was used at two top places, and that creates the 140px empty space you see.
To properly resolve these kind of issues, the theme given setting should be found for this spacing, and that should be adjusted. Usually that happens at Apparance -> Themes -> click on “Customize” at your theme. These will list the theme given options, including some spacings. You should note, that there isn’t a common place where developers are creating their settings, that is why a searching has to be done, or the theme’s developers should be contacted and asked. They can customize their codes as they want, so for example some themes offer their own menupoints within the left wp-admin menu, and then this “Customize” page isn’t used.
Alternatively, you can use the following CSS to overwrite your theme’s codes:
.wp-site-blocks > main{
margin-top:0!important;
}
.wp-site-blocks > main > div{
padding-top:0!important;
}If you donβt have a good place to put CSS codes, you could use a plugin like this one:
https://ww.wp.xz.cn/plugins/custom-css-js/
which will offer an option for you to create custom CSS.So to sum up, spacings before/after sliders are always being caused by themes and page builders.
Thanks for the great advise. Just one thing though (an FYI) I did not install any page builder. This is WP 2025 straight out of the box and only installing one of their own default themes offered by WP2025. Does this statement make any difference to what you have advised at all? Just curious. Thx, Fred.
I see now, that you are using Twenty Twenty-Five theme. WordPress comes with Gutenberg page builder by default, so that is why it exists on your website as well. These doesn’t really make a difference in this matter, so the spacing comes from Twenty Twenty-Five theme given codes. The only difference maybe, that WordPress default themes often lack options for some spaces and other settings, so custom codes are more likely have to be used.
Thanks for that info. I remember we use to have to install Gutenburg. lol. It’s been about 5 years since my last build but I have been building websites since 1990. So many changes….
The CSS you gave me I placed in Theme files/ styles.css I’m assuming this will fix my spacing issue, correct? Update file?Here is the Google drive screenshot url
https://drive.google.com/file/d/1GCugglhp1Ih4ox5deblaORi0CWS5brhW/view?usp=sharing-
This reply was modified 10 months, 4 weeks ago by
Anthony.
I don’t recommend putting the CSS code there, because if a new version of Twenty Twenty-Five will come out, and you update the theme, then you will lose the changes which were done in that file. So a plugin, like Simple Custom CSS and JS is better for such customizations, as the CSS codes you enter there will remain upon theme or plugin updates.
ok will do! I copied the code correctly though, right? Thanks for all the help. Have a great day!!
btw it worked!!Very happy and appreciated
ok will do! I copied the code correctly though, right? Thanks for all the help. Have a great day!!
Yes, I can see both of the styles loaded to your site.
btw it worked!!Very happy and appreciated
In this case I marked this topic as resolved.
I am glad my colleagues could help! πHave a nice day!
Best regards,
Laszlo. -
This reply was modified 10 months, 4 weeks ago by
The topic ‘Gap between Smart Slider and Header Menu’ is closed to new replies.