Insert colored border into image that is cover

Asked

Viewed 97 times

1

I’m trying to highlight a div who’s got a cover image with an edge using css, but I’m not getting it. I 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 checking the condition of the variable $capa = 1 and applying css.

The picture shows what I’m trying to do. inserir a descrição da imagem aqui

I tried to do something based on this post: Example of Edge

1 answer

1


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

<div <?php if($capa == 1){ ?>style="border-color: #f30;"<?php } ?>></div>
  • Thanks @Dvdsamm, solved my problem, thanks.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.