How to remove css repeating entries?

Asked By 0 points N/A Posted on -
qa-featured

Hi,

I have several style sheets and I want combine them and modify. In this process I want to remove all css repeating entries and what is the best method for doing that. Please give me a solution.

SHARE
Answered By 0 points N/A #138325

How to remove css repeating entries?

qa-featured

There are different ways to find the duplicate css classes or ids. Finding each entry and then changing is simple method for very small css files. But if css files are large then the best way is to go to http://www.codebeautifier.com.

Copy your css style and paste into input css on this page.

For example the following css style

#content {

          width: 500px;

          color: black;

          }

#nav{

          width: 200px;

          height: 100px;

          }

#content{

          background-color: #dedede;

          }

#nav{

          background-color:#dedede;

          }

.content{

          width:500px;

          color: black;

          }

.nav{

          width:200px;

          height:100px;

          }

.content{

          background-color: #dedede;

          }

.nav{

          background-color:#dedede;

          }

h1{ color: red;}

h1{ font-weight:bold;}

——————————————————————–

is changed into this

 

            h1{
                  color:red;
                  font-weight:700;
                } 
            #content,.content{
                                 width:500px;
                                 color:#000;
                                 background-color:#dedede;
                           } 
            #nav,.nav{
                          width:200px;
                          height:100px;
                          background-color:#dedede;
                        }

 

Now you can make changes easily. Hope this helps.

Login/Register to Answer

Related Questions