Topic: multi-item carousel button position

She Jong Shon free asked 6 years ago


How do I move the buttons to each side like below link? repositioned

Damian Gemza staff answered 6 years ago


Dear She Jong Shon, You could try to use the below approach. Just insert your multi-item carousel in .col-md-10 div, and use the below typescript code: .ts:
constructor(private renderer: Renderer2) {

}

ngAfterViewInit() {

letcontrols=document.querySelector('.controls-top');

this.renderer.setStyle(controls.children[0], 'position', 'absolute');

this.renderer.setStyle(controls.children[0], 'top', '50%');

this.renderer.setStyle(controls.children[0], 'right', '100%');

this.renderer.setStyle(controls.children[1], 'position', 'absolute');

this.renderer.setStyle(controls.children[1], 'top', '50%');

this.renderer.setStyle(controls.children[1], 'left', '100%');

}
Best Regards, Damian

She Jong Shon free commented 6 years ago

ERROR TypeError: Cannot read property 'children' of null

 

    let controls=document.querySelector('.controls-top');
    console.log(controls)
 
 
controls is null. Did you try on your end too?


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 6.2.3
  • Device: desktop
  • Browser: chrome
  • OS: windows 10
  • Provided sample code: No
  • Provided link: Yes
Tags