gpt4 book ai didi

html - 显示 : inline-block is not placing my div on the same line as the previous div

转载 作者:可可西里 更新时间:2023-11-01 14:58:56 30 4
gpt4 key购买 nike

我的代码如下所示:

#DigiCertBlahBlah {
display: inline-block;
width: 200px;
}

#formLogin {
display: inline-block;
}
<div class="content">
<img src="images/logo.png" />
<form name="formLogin" id="formLogin" method="post" action="Login.aspx">
...
</form>
<!-- Begin DigiCert site seal HTML and JavaScript -->
<div id="DigiCertBlahBlah" data-language="en_US">
<a href="http://www.digicert.com/unified-communications-ssl-tls.htm">UCC SSL</a>
</div>
<script type="text/javascript">
...
</script>
<!-- End DigiCert site seal HTML and JavaScript -->
</div>

我正在尝试获取 DigiCert <a>标记出现在 <form> 的右侧而不是单独一行。

但是,当我将它们设置为 display: inline-block; 时那什么都不做;它们仍然出现在不同的行上。

如何使链接出现在表格的右侧?我做不到float: right;因为脚本标签包含在 DOM 中动态插入元素的代码,这会导致表单在页面上跳转。

最佳答案

你到底想要什么?请试试这段代码

#DigiCertBlahBlah {
display: inline-block;
width: 200px;
vertical-align: super;
}

#formLogin {
display: inline-block;
}
<div class="content">
<img src="https://i347.photobucket.com/albums/p450/wassimahmad/logo_zpsxkwqnisr.png" />
<form name="formLogin" id="formLogin" method="post" action="Login.aspx">

</form>
<!-- Begin DigiCert site seal HTML and JavaScript -->
<div id="DigiCertBlahBlah" data-language="en_US">
<a href="http://www.digicert.com/unified-communications-ssl-tls.htm">UCC SSL</a>
</div>
<script type="text/javascript">

</script>
<!-- End DigiCert site seal HTML and JavaScript -->
</div>

**你可以在css上替换

#DigiCertBlahBlah {
display: inline-block;
width: 200px;
vertical-align: bottom;
}

**

**或这个**

#DigiCertBlahBlah {
display: inline-block;
width: 200px;
vertical-align: middle;
}

关于html - 显示 : inline-block is not placing my div on the same line as the previous div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57776067/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com