58 posts
  • Has been part of the Envato Community for over 2 years
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+1 more
Artzone13 says

Hi,

I have an issue, Some of the tags like body, a ., etc doesn’t seem to work with CSS, for example:

HTML ---------------------- <a href="#"></a> CSS --------------------- body{ font-family: 'robotoregular'; } a:hover{ text-decoration:none; }

these codes doesn’t seems to work, instead i am using classes for them like : .body ., etc. to work with their properties. i have also search for a while but i couldn’t find it,

If anyone knows about its fix, please help me to find out a solution for this !

Artzone13.

211 posts
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 2 years
+2 more
codeblvck says

Post snippets of your actual code, we cant tell what you could be doing wrong by what you have posted.

Are you using a framework? are you sure there arent any missing semicolons in your css? have you inspected elements using chrome dev tools, or firefox equivalent?

MuhammadHamzaKhan
MuhammadHamzaKhan Recent Posts Threads Started
25 posts
  • Sells items exclusively on Envato Market
  • Located in Pakistan
MuhammadHamzaKhan says

Hy Artzone !
The problem you’re telling is manly coming from CSS RESET. If you are using CSS RESET or using some plugins in which CSS RESET used, then you should place [ !importent ] after every property.


Example:
HTML ---------------------- <a href="#"></a> CSS --------------------- body{ font-family: 'robotoregular !important'; } a:hover{ text-decoration:none !important; }
211 posts
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 2 years
+2 more
codeblvck says

No css reset should set body font, and css reset values can be overridden by your own tags depending on the hierarchy of your css properties. You should find out what values are overriding your css, instead of just using !important,

by
by
by
by
by
by