css - How to change the color of a menu item

admin2025-06-05  7

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 6 years ago.

Improve this question

I want to change color to red for one menu page "Logowanie".

Anyone help how I can do it ?

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 6 years ago.

Improve this question

I want to change color to red for one menu page "Logowanie".

Anyone help how I can do it ?

Share Improve this question edited Dec 13, 2018 at 16:08 fuxia 107k39 gold badges255 silver badges461 bronze badges asked Dec 13, 2018 at 16:02 SylvesterSylvester 1115 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

You have to right click to the element you want to change color, then you will Inspect Element to know its ID, once you know the ID you have to add custom CSS changing the color of that item like this:

#menu-item-391 a {
  color: red;
}

You can use hex code for the color if you don't want pure red.

The answer provided by @Castiblanco will work, but using ID's for styling is a terrible idea. Add a class to your menu item and then adjust the color through your class.

.nav-link__red-class {    
  color: red;
}    
转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749100740a316366.html

最新回复(0)