I've created an HTML form using JavaScript, but I'm facing an issue where the cancel and submit buttons are displayed on separate lines. How can I align them horizontally?
Here is the code snippet I'm currently working with:
var new_comment_form = "<form id='add_comment' method='post'><textarea name='problem_comment' cols=60 rows=6 id='problem_comment'>" + problem_comment_text + "</textarea><input type='hidden' id='problem_id' name='problem_id' value='" + problem_id + "' /><input type='hidden' id='problem_comment_id' value='" + problem_comment_id + "' /><input type='submit' class='button' value='Edit Message' /><input type='button' class='button' id='cancel_comment' data-problem_id='" + problem_id + "' value='Cancel' /></form>";
The current layout looks messy. Can anyone suggest a cleaner approach for achieving this?
Appreciate your help!