s.onurgul
s.onurgul

Reputation: 17

div inside div inside <a href> css class

I'm using DevExpress components. There are examples in the form of a div div.

<div id="ctl09_DvUrunler_EPContainer" class="dxdvEPContainer_MetropolisBlue">
    <div>
        <a href="javascript:void(0)" onclick="aspxDVEPClick('ctl09_DvUrunler')"></a>
    </div>
</div>

  I must do

<a style="width:100px; etc.." href="javascript:void(0)" onclick="aspxDVEPClick('ctl09_DvUrunler')"></a>

but i can't write class for <a href> or inside div.

i think i should do

.dxdvEPContainer_MetropolisBlue > .div > .a { width: 760px !important; height:40px !important; font:16px !important; }

something like that. but it's not working. please help me.

Upvotes: 0

Views: 203

Answers (4)

Hacketo
Hacketo

Reputation: 4997

You have to remove the dots and add a display:inline-block

.dxdvEPContainer_MetropolisBlue > div > a {
    width: 760px !important;
    height:40px !important;
    font-size:16px !important;
    display:inline-block;
}

the inline-block allow you to set a size for an inline element. Also font property does not exist, replace it with font-size

Upvotes: 3

Wiram Rathod
Wiram Rathod

Reputation: 1919

add below css

#ctl09_DvUrunler_EPContainer div a{ 
 width: 760px !important; 
 height:40px !important; font:16px 
 !important;
}

Upvotes: 0

Beri
Beri

Reputation: 11610

Dor before element means it is a class, when you want to get element like div, just remove the dot.

.dxdvEPContainer_MetropolisBlue > div > a {
    width: 760px !important;
    height:40px !important;
    font:16px !important;
}

This path will find:

  • element with class dxdvEPContainer_MetropolisBlue
  • div as direct child
  • a as direct child of above div

Legend:

  • div - element div
  • .div - element with class="div"
  • #div - element with id="div"

Upvotes: 0

Michael Dowd
Michael Dowd

Reputation: 231

Your CSS selector should be

.dxdvEPContainer_MetropolisBlue > div > a 

The difference is div instead of .div and a instead of .a

Upvotes: 0

Related Questions