Kevin Powell - CommunityKP-C
Kevin Powell - Communityβ€’3y agoβ€’
25 replies
Kilo

Header navigation bar

So I have a header nav at the top of the page as shown in image.

all the code:
https://stackblitz.com/edit/web-platform-us4b5p?file=index.html

I want to make the entire blue square the link to the home page, not just the text.

I have a few questions relating to the above situation:

Is it okay for me to style the anchor element as if they were divs like I have done? What could I do alternatively if I shouldn't do that?

The default anchor styling was ruining the aesthetic, so I made the relevant properties "inherit", should I have just updated the stylings within the specific class instead?

Slightly off topic, but do the variables defined in a :root in one css file work in the other css files or do I have to redefine them in the files I use them?
Screenshot_2023-09-12_at_18-22-43_Solar_System.png
Was this page helpful?