css float - Applying CSS to elements within a <div> -


i have following html code,

<div class="part">     <div class="pleft">         <img src="images/1.jpg">         <b>image 1</b>     </div>     <div class="pright">         <img src="images/2.jpg">         <b>image 2</b>     </div> </div> 

how apply css styles image , b element under pleft , pright.

right i'm doing following way,

<div class="part">     <div class="pleft">         <img class="pl1" src="images/1.jpg">         <b class="pl2">image 1</b>     </div>     <div class="pright">         <img class="pr1" src="images/2.jpg">         <b class="pr2">image 2</b>     </div> </div> 

i wondering if there's short way it. divs pright , pleft run pretty long , don't want define new class each 1 of them.

appreciate help. regards.

your css this

.pleft {//your css} .pleft img {//your css} .pleft b {//your css}  .pright{//your css} .pright img{//your css} .pright b{//your css} 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -