CRAETE navigation list elements so that when the cursor hovers over them, the background color and text color are switched, and the cursor becomes a pointer

Tell us what’s happening:

Your code so far

body {
  background: #f5f6f7;
	color: #1b1b32;
	font-family: Helvetica;
	margin: 0;
}

header {
  width: 100%;
	height: 50px;
	background-color: #1b1b32;
	display: flex;
}

#logo {
  width: max(100px, 18vw);
	background-color: #0a0a23;
  aspect-ratio: 35 / 4;
	padding: 0.4rem;
}

h1 {
  color: #f1be32;
	font-size: min(5vw, 1.2em);
}

nav {
  width: 50%;
	max-width: 300px;
	height: 50px;
}

nav > ul {
  display: flex;
	justify-content: space-evenly;
}

nav > ul > li {
  color: #dfdfe2;
  margin: 0 0.2rem;
	padding: 0.2rem;
	display: block;
}



li > a {
  color: inherit;
	text-decoration:none;

}
nav li :hover{color:#1b1b32;
background-color:#dfdfe2;
cursor: pointer;
}

h1,
h2 {
  font-family: Verdana, Tahoma;
}

h2 {
  border-bottom: 4px solid #dfdfe2;
}

p::before {
  content: "Question #";
}

.sr-only {
  position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0

Challenge: Learn Accessibility by Building a Quiz - Step 46

Link to the challenge:

1 Like

Hey

All you have to do is read the HINT given when submiting your code, most of your problems will be solved.

Actually, your hover selector is wrongly written.

Brother …how am i suppose to write it?

I think i got it… thank you

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.