Link to home
Start Free TrialLog in
Avatar of mikha
mikhaFlag 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?
Avatar of Chinmay Patel
Chinmay Patel
Flag of India image

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
Avatar of Rob
Rob
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial