Menu icon Foundation
Problem with CSS code

Untitled

Hello
I have this html file with two style sheets. The first one is generated by Foundation and the second one is mine.
The second one content is:

* {
    margin: 0px;
}
            

         

But the browser doesn't care the codes in the second file.
Please say me why and how can I fix it?

cssfiles

Untitled

Hello
I have this html file with two style sheets. The first one is generated by Foundation and the second one is mine.
The second one content is:

* {
    margin: 0px;
}
            

         

But the browser doesn't care the codes in the second file.
Please say me why and how can I fix it?


Wing-Hou Chan gave the most helpful answer for this post
Wing-Hou Chan over 5 years ago

Hey there!

Are there specific elements in which a margin of 0px is not being applied to?

Some CSS rules in Foundation have !important applied. You can overwrite them by placing your own !important rules.

I don't recommend applying a margin of 0px to everything. Some things such as rows have a rule like this: margin: 0 auto;; so if you use *{ margin: 0;} you might mess some things up such as your rows.

This post has been closed. No new replies can be added.

Wing-Hou Chan over 5 years ago

Hey there!

Are there specific elements in which a margin of 0px is not being applied to?

Some CSS rules in Foundation have !important applied. You can overwrite them by placing your own !important rules.

I don't recommend applying a margin of 0px to everything. Some things such as rows have a rule like this: margin: 0 auto;; so if you use *{ margin: 0;} you might mess some things up such as your rows.