Reputation: 605
Very simple app.component.html:
<input type="submit" value="Sub"/>
The result of the code above
How to remove margin arround the button? I want the button is located on the top left without indent.
Upvotes: 7
Views: 16938
Reputation: 341
Use in app.component.scss
::ng-deep * {
margin: 0;
padding: 0;
}
Upvotes: 19
Reputation: 21
You have to go to the styles.css of the proyect and write
body{
margin:0;
padding:0;
}
and that's it, it's simple Hope it works, this was the way I solved the problem
Upvotes: 2
Reputation: 774
If you want to fix it at top left forcefully without removing any margin padding in container. Add style to it position:fixed;top: 0;left: 0; Or set html, body{ padding: 0px;margin: 0px;} in your style.css file
Upvotes: 1
Reputation: 389
That is not from angular, it is added by browser. You have to reset css
Upvotes: -1
Reputation: 605
Why does angular use what default padding?
Problem resolved!
I added this code in the global styles:
body {
margin: 0;
padding: 0;
}
Upvotes: 18