Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
HTML提交按钮与文本位于同一行,但需要向右对齐_Html - Fatal编程技术网

HTML提交按钮与文本位于同一行,但需要向右对齐

HTML提交按钮与文本位于同一行,但需要向右对齐,html,Html,我有一个列表,列出每个用户,并给出一个按钮,你可以按下 echo "ID: <font color='white'>",$id0,"</font> - <a href='viewprofile.php?userid=$id0'><font color='$namecolor'>",$username34,"</font></a> <input style=align: right' type='submi

我有一个列表,列出每个用户,并给出一个按钮,你可以按下

echo "ID: <font color='white'>",$id0,"</font> - <a href='viewprofile.php?userid=$id0'><font        color='$namecolor'>",$username34,"</font></a> <input style=align: right' type='submit' name='battle' value='Battle' /> <br> ";

echo“ID:,$id0,”-而不是在css中使用align:right尝试float:right

echo "ID: <font color='white'>",$id0,"</font> - <a href='viewprofile.php?userid=$id0'><font        color='$namecolor'>",$username34,"</font></a> <input style='float: right' type='submit' name='battle' value='Battle' /> <br> ";
echo“ID:”,$id0,“-
”;
我已经试过了,但又试了一次,效果很好:P我想这可能与我使用的分隔符(
)有关?如果我在“请尝试将每行内容包装到div中,然后在每行添加float,将下一个元素适当地放置在可用空间中。清除:两个都清除以前分配的浮动。@Ryan Mckenna如果你得到了正确答案,就标记正确答案answer@Vicky在选择正确答案之前,我不得不等待