Avatar of mikha
mikha
Flag for United States of America asked on

customize bootstrap navigation and dropdown

I'm utilizing bootstrap 4 to create navigation and dropdown menu for my website.

how can I customize, or override default  color, size of dropdown and navigation menu?
Web DevelopmentCSSBootstrap

Avatar of undefined
Last Comment
Rob

8/22/2022 - Mon
Chinmay Patel

Hi c k,

This is a two step process. The first one is to add another CSS file(for example, I use site.css 'cause Visual Studio default Project settings that file).

And include in all the pages/templates after bootstrap.
i.e.

<link href="Styles/bootstrap.css" rel="stylesheet"> 
<link href="Styles/site. css" rel="stylesheet">

Open in new window


And in the site.css, change the definition as you see fit. Also you can use !important keyword to hint the overrides as well.

For exammple,

.dropdown-item { background-color: red; color: white; }

Open in new window


Regards,
Chinmay.
ASKER CERTIFIED SOLUTION
Rob

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes