Insert colored border into image that is cover

1

I'm trying to highlight a div that has a cover image with a border using css , but I'm not getting it. I do a loop to show the images but the user can not know which image is the cover, the image below shows how my script is.

<li class="span3">
  <div class="thumbnail">     
    <div class="caption">           
    <p> 
        <button name="btnexcluir" id_banner="<?php echo $id_banner; ?>" id_banner_foto="<?php echo $id_banner_foto; ?>" class="btn btn-danger" type="button" >Excluir</button> 
        <button name="btncapa" id_banner="<?php echo $id_banner; ?>" id_banner_foto="<?php echo $id_banner_foto; ?>" class="btn btn-primary" type="button" >Capa</button>       
    </p>            
    </div>      
    <img src="<?php echo "../".$row_rcImagens['caminho_thumbs']; ?>" />
  </div>              
</li>

I tried to make a if by checking the condition of the variable $capa = 1 and applying the css.

The image shows what I'm trying to do.

Itriedtodosomethingbasedonthispost: Edge Example

    
asked by anonymous 29.08.2017 / 01:57

1 answer

1

Apply a css inline in the div that you want the colored border:

<div <?php if($capa == 1){ ?>style="border-color: #f30;"<?php } ?>></div>
    
29.08.2017 / 02:04