Reputation: 317
I have a table where one of the is like this:
<td class="acciones" width="20%">
<span class="btn-group-action">
<!-- EDITAR -->
<span data-toggle="tooltip" class="btn-group label-tooltip" data-original-title="Editar" data-html="true" data-placement="left">
<!-- <a class="btn btn-default " href="<?php echo base_url('diccionarios/elemento_especifico_diccionario').'/'.$elemento['ELDI_Id'];?>" title="Editar">
<i class="material-icons">edit</i>
</a> -->
<a class="btn btn-default editar_elemento_diccionario" title="Editar">
<i class="material-icons">edit</i>
</a>
</span>
<!-- BORRAR -->
<span class="btn-group label-tooltip eliminar_elemento_diccionario" id='<?
php echo $elemento['ELDI_Id']; ?>' title="Eliminar" data-toggle="tooltip">
<a class="btn btn-default" href="#"><i class="material-icons">delete</i>
</a>
</span>
</span>
<span class="btn-group-action" style="margin-right:3.46px">
<!-- BAJAR POSICIÓN -->
<span data-toggle="tooltip" class="btn-group label-tooltip" data-original-
title="Bajar posición" data-html="true" data-placement="left">
<a class="btn btn-default bajar_posicion_elemento" title="Bajar
posición">
<i class="material-icons">arrow_drop_down</i>
</a>
</span>
<!-- SUBIR POSICIÓN -->
<span data-toggle="tooltip" class="btn-group label-tooltip" data-original-
title="Subir posición" data-html="true" data-placement="left">
<a class="btn btn-
default subir_posicion_elemento" title="Subir posición">
<i class="material-
icons">arrow_drop_up</i>
</a>
</span>
</span>
</td>
I don't know how to do this, I tried with CSS but can't make it work.
Thanks for your time.
Image showing the icons I need to hide: enter image description here
Ok, I finally figured it out, so here's the answer, simple but I don't have idea about css >.<
tr:first-child .subir_posicion_elemento, tr:last-child .bajar_posicion_elemento {
display:none;
}
Upvotes: 0
Views: 469
Reputation: 646
Use this CSS code to hide first-child and last-child icons in a table:
table tr td:first-child .subir_posicion_elemento{
display:none;
}
table tr td:last-child .bajar_posicion_elemento {
display:none;
}
Upvotes: 1
Reputation: 123
Like this?
table tbody tr td:nth-child(1) .subir_posicion_elemento {
visibility:hidden;
}
table tbody tr td:nth-last-child(1) .bajar_posicion_elemento {
visibility:hidden;
}
https://codepen.io/vommbat/pen/yqEBPd
Upvotes: 0
Reputation: 317
Ok, I finally figured it out, so here's the answer, simple but I don't have idea about css >.<
tr:first-child .subir_posicion_elemento, tr:last-child .bajar_posicion_elemento {
display:none;
}
Thanks!
Upvotes: 0