Skip to main content
Participant
October 31, 2017
解決済み

Quick Edit Sometimes Returns Too Many CSS Rules

  • October 31, 2017
  • 返信数 1.
  • 353 ビュー

In Adobe Dreamweaver CC v18.0, I am working on a website. I started by making a local copy of one of my client's existing websites. I am now making the changes and am far along. This website uses many (about 20) CSS files. My issue is that when I use the Quick Edit feature in DW, sometimes DW finds and presents for editing the exact CSS rule. But for some code, Quick Edit returns a panel with MANY CSS rules, when in fact only one of those rules is relevant to the bit of HTML. It is then up to me to hunt through the rules to find the relevant rule.

My hope is that there is a way to have Quick Edit home in on the correct rule. I hope one of you can provide me with guidance.

Here is a portion of my HTML:

              <div class="e18logo"> 

                  <img src="./mainlogo.png">

            </div>

And here are the relevant CSS rules which apply:

.e18logo {

     position: absolute;

     width: 100%;

     z-index: 3;

}

.e18logo img {

     width: 40%;

     display: block;

     margin: auto;

     z-index: 3;

}

Invoking Quick Edit when cursor is resting on the <div class="e18logo">  line correctly finds the .e18log rule.

However, invoking Quick Edit when cursor is resting on the <img src="./mainlogo.png"> line returns every CSS rule which includes "img".

Any help will be appreciated!

このトピックへの返信は締め切られました。
解決に役立った回答 pziecina

Quick edit is working correctly as it finds rules according to the css cascade.

That means it will start with rules associated with the img element first, (using your examples) as those would be more specific to the image element, with the class being less specific in the cascade.

返信数 1

pziecina
pziecina解決!
Legend
October 31, 2017

Quick edit is working correctly as it finds rules according to the css cascade.

That means it will start with rules associated with the img element first, (using your examples) as those would be more specific to the image element, with the class being less specific in the cascade.