Click here to Skip to main content
14,661,016 members
Rate this:
Please Sign up or sign in to vote.
I had applied some blue color code and now i wanna change it to another one, but i do not want to do it line by line, because i almost used it in every page of my website. So what is your advice?

Thanks in advance.

What I have tried:

I have searched about it, but no helpful answer.
Posted
Updated 9-Jul-19 10:03am

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

The advice is simple... create an external CSS file and define the colors for the page, and call it on the pages of concern.
<link type="text/css" rel="stylesheet" href="/Path/to/your/styles.css">
Something to note and take advantage of... Whichever styles appear last are the ones used for identical matching selectors
   
Comments
Member 12702056 9-Jul-19 16:37pm
   
Thank u for your advice, i have external css file, but as i use bootstrap, some css files are already ready, not written by me. So i wanna find a way not to change line by line or attribute by attribute
MadMyche 9-Jul-19 17:17pm
   
You will need to identify those elements you changed in the original bootstrap.css file then.
OR identify the element selectors changed and throw them into a new CSS file linked in to the pages after the bootstrap link and it will overwrite those specific elements
Member 12702056 9-Jul-19 17:41pm
   
Thank u so much, i will try it :)
Member 12702056 9-Jul-19 19:09pm
   
I have tried the second way that u advised me, but idk why, it didn't work :( IDK what i have done wrong

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100