Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to override ng2 pdf viewer css

Tags:

css

angular

I am rendering pdf in a angular material dialog. I am using ng2-pdf-viewer when I inspect, I see container width is very small which I want to increase. So, I want to change

enter image description here

.ng2-pdf-viewer-container[_ngcontent-c13] {
     overflow-x: auto; 
}

to

 .ng2-pdf-viewer-container[_ngcontent-c13] {
         width: 100%;
    }

I tried !important but it is not working

How to do that?

like image 607
Humble Dolt Avatar asked Jan 16 '18 06:01

Humble Dolt


2 Answers

this worked for me

:host ::ng-deep .ng2-pdf-viewer-container {
width: 100% !important; 

}

like image 57
Babar Hamid Avatar answered Oct 21 '22 13:10

Babar Hamid


:host ::ng-deep .ng2-pdf-viewer-container .page {margin-bottom: 0px !important;}

this works for me. I want to change the margin-bottom.

like image 29
F.Maskuriy Avatar answered Oct 21 '22 14:10

F.Maskuriy