I need to set width for div depends upon its content.. Below is my HTML flow.
Flow 1:
<div id="header-cart" class="block block-cart skip-content skip-active">
<div class="minicart-wrapper">
<p class="block-subtitle"></p>
<p class="empty">You have no items in your shopping cart.</p>
</div>
</div>
Flow 2:
<div id="header-cart" class="block block-cart skip-content skip-active">
<div class="minicart-wrapper">
<p class="block-subtitle"></p>
<div>
<div id="minicart-widgets"> </div>
<div class="block-content"></div>
<div class="minicart-actions"></div>
</div>
</div>
</div>
I have two HTML flows explained above.. What i need is to set
width as 220px and 300px
for
<div id="header-cart">
.
When there is an occurance of <p class="empty"> in <div id="header-cart">
<div id="header-cart">
should be in
width 220px
.
and if not it should be in 300px.
I dont know how to set flow for this cascade.
Can any one help me?? Thanks in advance..