Pradeep Nuji
Pradeep Nuji

Reputation: 23

Overwrite span styles

I am new to CSS !

I would like to overwrite a span style using external CSS. Any suggestions?

!important did not work for me. Sample code below.

 <div class="abc" id= "xy" style="font-size: 30px;">
  <span style="color: #009530;">bcdefghijklmnopqrstuvwxyz bananaaa</span>      </div>

basically I would like to overwrite the #009530 for the text using a external css.

I tried like below external css. It did not work for me.

  #xy {
        color: blue !important;
      }

TIA

Upvotes: 2

Views: 931

Answers (2)

Jesse
Jesse

Reputation: 1262

<span id="xy" style="color: #009530;">bcdefghijklmnopqrstuvwxyz bananaaa</span>

css

 #xy 
 {
    color: blue !important;
 } 

Upvotes: 0

Manwal
Manwal

Reputation: 23816

Use following css:

#xy span{
    color: blue !important;
}
<div class="abc" id="xy" style="font-size: 30px;">
    <span style="color: #009530;">bcdefghijklmnopqrstuvwxyz bananaaa</span>
</div>

Upvotes: 2

Related Questions