Peter1990 Posted July 13, 2020 Share Posted July 13, 2020 Hi, After I used bootstrap in my project, I recognized that it makes problems in my CSS file. Every parameter that I used in my CSS file is misplaced when I use Bootstrap. When I comment my Bootstrap file, everything is OK. What should I do in order these two files to works independently? Link to comment Share on other sites More sharing options...
dsonesuk Posted July 14, 2020 Share Posted July 14, 2020 Bootstrap uses !important A LOT! so you have to do the same and use this to overide bootstrap properties using !important. 1 Link to comment Share on other sites More sharing options...
rstuckjr Posted July 14, 2020 Share Posted July 14, 2020 (edited) got it Edited July 14, 2020 by rstuckjr Link to comment Share on other sites More sharing options...
Peter1990 Posted July 14, 2020 Author Share Posted July 14, 2020 (edited) 12 hours ago, dsonesuk said: Bootstrap uses !important A LOT! so you have to do the same and use this to overide bootstrap properties using !important. dsibesuk, thank you for your answer. I know that bootstrap use !important, but I don`t understand you what should I do? What does it means to overide bootstrap properties? Do you mean I should use !important in my style.css file? Do you mean I should remove !important from bootstrap file? Also, I tried to set my style.css file after the bootstrap, but with no success. I tried to use !important in my style.css file - no success. Edited July 14, 2020 by Peter1990 Link to comment Share on other sites More sharing options...
dsonesuk Posted July 14, 2020 Share Posted July 14, 2020 YES! Your stylesheet should always follow bootstrap, check an element through web development tools F12, check elements for bootstrap styling, make note of bootstrap selector, style how you want it and if required add !important. Web developer will let you edit stylesheet live, without actually changing anything, therefore you changr, turn off the styling until you get result you require, it even list the changes you have made to achieve that result, although you have to enable it first. 1 Link to comment Share on other sites More sharing options...
ishan_shah Posted July 20, 2020 Share Posted July 20, 2020 I would like to add one more thing ,always put your custom css link after bootstrap Link to comment Share on other sites More sharing options...
dsonesuk Posted July 20, 2020 Share Posted July 20, 2020 Is it not a stylesheet? Does the op even have stylesheet named custom.css? If not! Why? Have you been copying and pasting again! ...sorry, silly question. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now