Below is the JavaScript code I am using:
$('#needdiv').append('<img src="/images/Connect.png" id="connectimage">' + '</img>'
+ '<input type="button" id="connect" value=connect >' + '</input>'
+ '<img src="/images/Remove.png" id="removeimage" />'
+ '<input type="button" id="remove" value="remove">'+'</input>');
On my HTML page, I have the following:
<div id=needdiv></div>
The CSS for this setup is:
#connectimage
{float:left;
vertical-align:left;
}
#connect
{ text-decoration:none;
vertical-align:middle;
}
#removeimage
{
vertical-align:middle;
}
#remove
{
vertical-align:right;
}
I am trying to display the image and buttons in a single line. The goal is to have the connect image
on the left side, connect button
and remove image
in the middle, and the remove button
on the right. All elements should be within the same line.