I am creating a simple website just for practicing, and I am stuck with something: I can’t style an anchor (link) in CSS, I want to align it to the center, but I can’t find it in CSS.
Look the pictures! In the CSS image, it should appear the class of what I’m trying to stylizing, right? Why doesn’t it appear?
In the same HTML file, I have some buttons and other elements that I’ve put a class so I can call it in CSS, but I can’t call this anchor into CSS to stylize. What can I do?
2
Answers
Yeah, sure. I could already centered the anchor link, but I can't change the color of the link text. How can I do it?
}
This is the code in CSS, it's an anchor link, and I could align it to the center. Now, changing the color, it doesn't change the color of the link. How can I do this?
It seems to me that what you are trying to do is define the class attribute within your HTML file and expect to be able to see it in the CSS file.
It doesn’t work that way. It’s the other way round. Where you create the class first in the CSS file and you would be able to add it to the class attribute on the HTML file.