Do i enter the code inside the .body or use * selector?


#1


Learn HTML & CSS: Part I
Resetting Defaults


No error Just confirming if I should write the code inside the .body element or should i write it above first line using the * selector.
I tried both I don't notice a difference in the page styling.


It said to write it in body so i just added it 

.body {
  background-color: #FFF;
  font-family: 'Raleway', sans-serif;
  margin: 0;
  padding: 0;

or should I have written up top 

* {
  margin: 0;
  padding: 0;
}


#2

If you apply the reset to the body element only, it will not affect lists, definition lists, or blockquotes or paragraphs. If you apply it with the universal selector every node gets reset.


#3

thank you that made sense


#4

Also, body is used as body { and not .body{


#5

oops thanks for pointing that out


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.