0

How to delete margin ?

Hello I want to delete completely the margin of some elements(delete the white around them) I tried this : element { margin:0; padding:0; } But it doesn't work :( I tried this also : * { margin:0; padding:0; } It works but for all elements :(

23rd Sep 2018, 3:12 PM
Chris
6 Respostas
+ 4
you might already know this but tags like the body tag has default attributes like margins this is why you see margin:0; alot in the css body tag
23rd Sep 2018, 6:38 PM
D_Stark
D_Stark - avatar
+ 2
Do you have an example of an element that didn't work on? There could be several possible causes, so it's generally best to see the full code. Please provide a link to your Code Playground code so we can help you troubleshoot the specific issues you are running into. The Code Playground should be relatively easy to find in the website version of SoloLearn, but if you are in the app version, it can be accessed via the curly braces, green circle with plus sign to add a new project, then select the project type. Looking forward.
23rd Sep 2018, 3:27 PM
Janning⭐
Janning⭐ - avatar
+ 2
it works thank you :3
23rd Sep 2018, 6:40 PM
Chris
0
a nav, a footer and an img element
23rd Sep 2018, 4:03 PM
Chris
0
an iframe
23rd Sep 2018, 4:12 PM
Chris