How to edit the Html of my site that uses a different css

I'm using an imported css instead of one from WP. I also didn't upload the site myself.

I want to change the look of the colours of the nav compartment to different colours. I can't do this with css, but with HTML, since I went to change each button to a different colour from the other.

Please, how can I do this in the WP environment?

Thanks immensely.

Topic html Wordpress

Category Web


There are a few different ways to accomplish the goal of coloring navigation buttons differently. Pure CSS is one option - using nth-child selectors to target individual buttons to color them differently. But then every time you change buttons, you might have to change CSS to ensure particular buttons stay particular colors.

If the item you're updating is a WordPress Menu, called using wp_nav_menu, a combination CSS/markup option is to go to Appearance > Menus, select the Screen Options tab, and enable CSS Classes. You can then add a CSS class to each item, for example red-button for one item and blue-button for another. You then just need to add the CSS for each class, such as in Custom CSS if it's enabled on your site.

Another way using wp_nav_menu is to create a custom walker so that you output different CSS classes for different conditions. If say you're looking for a repeating rainbow, where item 1 is red, 2 is green, 3 is blue, and then it repeats, this would be easy to accomplish. And once again, you then need to add the CSS for each of these classes.

custom walker.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.