I'll-Be-Back
I'll-Be-Back

Reputation: 10828

Mulitple panel-body in a panel div

Is it ok to have mulitple panel-body in a panel div? Or will there be any side effect.

For example:

<div class="panel panel-default special-style-border">
    <div class="panel-heading">
         <div class="panel-title">Heading 1</div>
    </div>
    <div class="panel-body">
     Body One
   </div>

   <hr />

    <div class="panel-heading">
       <div class="panel-title">Heading 2</div>
    </div>
    <div class="panel-body">
     Body Two
   </div>
</div>

Upvotes: 0

Views: 1139

Answers (1)

Russell Alan
Russell Alan

Reputation: 116

CSS class tags are intended to be used when the properties will apply to multiple elements.

ID tags on the other hand are intended to be used once on a single element.

ID's are given higher precedence than classes so if you manage to give some element an ID tag with the same name as a class...the properties of the ID tag will be used.

Upvotes: 1

Related Questions