Hidden attribute in <span></span> element does not work?

Asked

Viewed 430 times

0

Hail! I think it’s kind of a basic question, but come on. In one of the application views a table is mounted and in the rightmost column two elements are included to type span. To the last I included the attribute Hidden (Hidden="Hidden"). However the element is shown as can be seen in the following fiddle - http://jsfiddle.net/6fswhgd3/.

Obviously I don’t want to use the styling feature span as I did in the last row of the example table.

What can I do? Thank you for your attention. Paulo Ricardo Ferreira

  • 1

    There is no Hidden attribute. If you want to hide the span use css - display: none

  • @Pedrocamarajunior, according to the website w3schools there is the Hidden attribute. Thank you.

  • It actually exists in HTML5 Paul. I believe your problem is because the class of bootstrap - glyphicon changes the display of the element to inline as soon as css is loaded.

  • 1

    @Pedrocamarajunior, in fact, the Glyphicon class changes the display to inline-block. Thank you.

  • Post an answer with the solution found, if other users have the same problem, they will know what was done to solve. :)

  • @Pedrocamarajunior, both answers below solve the problem.

Show 1 more comment

2 answers

0

You can use this code in Html:

  <span class="glyphicon glyphicon-trash"></span><span class="glyphicon glyphicon-refresh" id = "ak"></span>

In Html I created an Id for this span to be able to edit it in CSS.

And create a CSS with the code:

 #ak { visibility:hidden }

It’ll look like this fiddle: http://jsfiddle.net/7bvqc0er/1/

0


According to the code Voce sent in fillde, its span tag should have something like this:

<span class="glyphicon glyphicon-refresh" style="display:none"></span>

For more details: http://jsfiddle.net/6fswhgd3/1/

  • Thiago, I know, so much so that in the third row of the table I used this feature, but only to test. But as I posted on my question, I would not like to use this feature because of what I wish to do on the interface. Thank you.

Browser other questions tagged

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