Sohil Shah
Sohil Shah

Reputation: 135

How to define a style for all the elements inside a parent element?

I have some structure like this....

<div class="pull-right visible-xs col-xs-4 text-xs-center menu_bars">
                    <p style="margin: 10px;">
                        <i class="fa fa-bars fa-2x"></i>
                    </p>
                    <i class="fa fa-search"></i>
                </div>

I want to define style cursor:pointer for all the <i> under the class menu_bars.

How can i do this?

Upvotes: 1

Views: 66

Answers (5)

user3561602
user3561602

Reputation: 11

using css, you can use class selector. in the css file (or in css script):

.menu_bars{
  cursor: pointer;
}
<div class="pull-right visible-xs col-xs-4 text-xs-center menu_bars">
                    <p style="margin: 10px;">
                        <i class="fa fa-bars fa-2x">Text Here</i>
                    </p>
                    <i class="fa fa-search"></i>
                </div>

Upvotes: 0

Pragatheeswaran
Pragatheeswaran

Reputation: 120

Use this

.menu_bars i {
cursor:pointer;
}

Upvotes: 0

Saeed
Saeed

Reputation: 671

You can use this CSS code block:

.menu_bars i {
    cursor:pointer;
}

Upvotes: 0

dstN
dstN

Reputation: 332

.menu_bars i {
  cursor: pointer;
}

Upvotes: 1

soorapadman
soorapadman

Reputation: 4509

try this:

.menu_bars i{
cursor:pointer;
}

Upvotes: 0

Related Questions