1
Well, answering the question the way she is now - The disabled
as its name says, it is only to disable/disable a/input/etc button. To make the button disappear when it is disabled, you would need to add the following CSS style:
.go[disabled] {
display:none;
}
Here we select the class.go
instead of .prev
so that the style is applied in both scenarios, if any of the buttons is disabled it will apply - display:none;
.
Answering the original question:
To customize these buttons, just create the CSS style for them, for example:
.go {background-color: royalblue; padding:5px 30px;}
However there are certain CSS styles that do not apply to buttons <button>
and/or also styles already implemented in the default browser for the tag button
we would have to remove them to customize them again our way. But we can always get around this using good practices like using a div/a/span
etc as button instead of tag button
.
As in the example of these buttons below created with the tag <span>
:
.animate {
transition: all 0.1s;
-webkit-transition: all 0.1s;
}
.random-button{
position: relative;
padding: 5px 30px;
margin: 0px 10px;
border-radius: 10px;
font-size: 25px;
color: #FFF;
text-decoration: none;
}
.go {
background-color: #3498DB;
border-bottom: 5px solid #2980B9;
text-shadow: 0px -2px #2980B9;
cursor:pointer;
}
.random-button:active {
transform: translate(0px,5px);
-webkit-transform: translate(0px,5px);
border-bottom: 1px solid;
}
<div class="wrapper">
<div class="header">
<span class="prev random-button animate go" data-go="-1" disabled>←</span>
<span class="title">TABELA</span>
<span class="next random-button animate go" data-go="1">→</span>
</div>
</div>
<br /><br />
<div class="wrapper">
<div class="header">
<span class="prev random-button animate go" data-go="-1" disabled>◄</span>
<span class="title">TABELA</span>
<span class="next random-button animate go" data-go="1">►</span>
</div>
</div>
Or you can even use images as a button, like in example of the link to this reply.
Can you show me all your code? Otherwise it is difficult to know what will work for you or not, even more than the HTML you posted does not match the entire table. I also removed the java tag from your question because (at least the way it is), it has no relation to java.
– Victor Stafusa
My question was changed and with it the whole idea proposed, I do not want the button to disappear, I want the button to stay there, because people need to see them to click and move to the next round, would be what I posted at the beginning, wanted something more beautiful than these two little arrows.
– Leandro Santos Oliveira
Leandro, if you do not agree with the latest edition, then it is best to reverse it (or else edit the question again to look like you think it is best). Content edits here should never contradict the will of those who originally created such content.
– Victor Stafusa
Thank you, the @Chun answer worked here;really with the change lost its meaning, but the answer on top of the initial question worked.
– Leandro Santos Oliveira
Leandro, I reversed the last amendment to the question.
– Victor Stafusa