-1
I imported Tabledit Jquery on my page, but for some reason, the icons aren’t aligning as they should be, as I might be implementing css for buttons
align (one side of the other)?
Code:
$('#example').Tabledit({
...
buttons: {
edit: {
html: '<span class="fas fa-pencil-alt"></span>',
action: 'edit'
},
delete: {
html: '<span class="fas fa-trash-alt"></span>',
action: 'delete'
},
save: {
class: 'btn btn-sm btn-success',
html: 'Save'
},
confirm: {
class: 'btn btn-sm btn-danger',
html: 'Confirm'
}
},
});
Through my browser, appears this way:
I tried to change the
float
, but it didn’t work.
Your problem then is not with the icons, but with btn Save.
– hugocsl
Puts the display-inline-block class on the button to see if it resolves.
– hugocsl
edit your question, put the html output from the button line part... Difficult to help without having more complete information...
– caiovisk
@caiovisk edited the post, see if it helps at anything....
– vrauzeera_
Place a div around the buttons, and place it in the flex css:
flex-wrap: wrap; justify-content: center; align-items: center; display: flex; min-width: 180px
, see if solved. Read a little about flexbox here and here– Ivan Ferrer
How would I do that in mine
code
represented above?– vrauzeera_
You can rewrite any element, came to see the documentation, but you can use wrap:
$('#example').Tabledit({...}).find('[type="button"]').wrap( "<div class='content-buttons'></div>" );
– Ivan Ferrer
Instead of the image, which doesn’t help so much, you could put the HTML code??? anyway, put it in your stylesheet
.tabledit-toolbar { display: flex; }
and see if it works– caiovisk
@caiovisk friend, I don’t have this html code, it’s not in my code, I’m importing to
Tabledit
, that consequently brings these codes to the browser.– vrauzeera_
Didn’t work @Ivanferrer
– vrauzeera_
Glue the entire code to one jsfiddle to see the real problem.
– Ivan Ferrer
https://jsfiddle.net/dj3fnxkc/9/ , I could not import the icons, so the edit, delete, confirm button could be displayed...
– vrauzeera_