Remove space from around the slider

Themes and page builders are often creating empty spaces between the parts of your website, what you don't want to have there. The best way to remove them would be to  identify which css code is creating these spaces and either modify the original css code, or make a stronger css code and for example use a plugin like Simple CSS to add the extra css code to your website. But there is another, simpler way: use javascript to remove the space.

Go to the  JavaScript callbacks of your slider and try out these codes in it:

Remove paddings and margins from parent elements
var number_of_parents = 3;

if(!jQuery('#n2-admin').length){
  var id = jQuery('#n2-ss-' + jQuery(this)[0]['id'] + '-align');
  var current = id;
  for(var i=0; i<number_of_parents; i++){
     current = current.parent();
     current.css({padding:0, margin:0});
  }
}

This code would remove the padding and margin values from the first 3 parents of the slider. Usually the number 3 is what you need, but if that wouldn't remove the space, or it would remove space from higher elements too, change this number. Make tests with numbers from 1 to 10 with the number_of_parents variable and one of them should work, unless the next method is necessary.

Hide siblings
var number_of_siblings = 3;

if(!jQuery('#n2-admin').length){
  var id_num = jQuery(this)[0]['id'];
  var id = jQuery('#n2-ss-' + id_num + '-align');
  for(var i=0; i<number_of_siblings; i++){
     if(id.siblings().eq(i)[0] == jQuery('#n2-ss-' + id_num + '-placeholder')[0]){
        i++;
        number_of_siblings++;
     }
     id.siblings().eq(i).hide(0);
  }
}

This code would hide the siblings of the slider. Themes and page builders are sometimes putting down empty <p></p> elements before and after other elements, like our slider and with this code you could make those elements disappear. Make tests with numbers from 1 to 10 with the number_of_siblings variable and one of them should work, unless the previous method is necessary.

You might need to mix the two options, so you could also try to make tests with both of them being in the  JavaScript callbacks field.

Remove height from parents
var id = jQuery('#n2-ss-' + jQuery(this)[0]['id'] + '-align');
id.parents().each(function(){
    this.style.setProperty('height','auto','important');
    this.style.setProperty('min-height',0,'important');
});

This code would remove the not automatic heights from the slider's parent elements.