So i got this on HTML part :<html> <head> <meta charset="UTF-8"> <title></title> <link rel="stylesheet" type="text/css" href="main.css" /> </head> <body> <p id="paragraf" name="paragraf">Ana are mere!</p> </body></html>And this part on CSS Part .paragraf:hover{ color: brown; pointer-events: visibleStroke;}What am i doing wrong?if i put :p:hover{ color: brown; pointer-events: visibleStroke;}It works. If i use the id "paragraf" it won't turn the text brown. Help?
Id for use in the css should be:#paragrafAnd for classes is as follows:.paragrafThat was the problem in the css you gave style to a class when you have a id.Code: #paragraf:hover{ color: brown; pointer-events: visibleStroke;}
Since it wasn't mentioned, I'll add in:Code: p:hoverworks for you because it's selecting every "p" tag on the page, which obviously includes your #paragraf element.