Jump to content
Peter1990

My bootstrap code makes mess in my CSS code

Recommended Posts

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?

Share this post


Link to post
Share on other sites

Bootstrap uses !important A LOT! so you have to do the same and use this to overide bootstrap properties using !important.

  • Like 1

Share this post


Link to post
Share on other sites
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 by Peter1990

Share this post


Link to post
Share on other sites

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.

  • Like 1

Share this post


Link to post
Share on other sites

I would like to add one more thing ,always put your custom css link after bootstrap

 

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...