I don't know the difference between "#" and "."to make a class. Example:
.teste {
color: red;
}
#teste {
color: red;
}
I don't know the difference between "#" and "."to make a class. Example:
.teste {
color: red;
}
#teste {
color: red;
}
#
refers to the Id of an element, while .
refers to a class. Read through https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_started/Selectors
#
refer to IDs of HTML elements. .
refer to classes of HTML elements.
Given your example, the .teste
will color the first div
red, and the #teste
will color the second div
red.
<div class="teste"></div>
<div id="teste"></div>
See http://www.w3schools.com/CSSref/css_selectors.asp for more info.
'#' signifies a css 'id' whereas '.' is a css 'class'. Functionally they are the same, but conventionally you should only use an id once per page, and a class for multiple elements on the same page.