jquery - 将 jquery ui 工具提示图标与文本对齐

标签 jquery html css

我在将工具提示图标与段落对齐时遇到了一些麻烦,这是我的 html 代码

<div class="tool-tipster" title="For example “8am to 5pm” or “Anytime”"></div>
<p class="information-section">Please tell us what hours you are available the following days.</p>

这是我到目前为止的 CSS

.form__primary.form__two-column .tooltipster-icon{
    float: right;
}

我基本上希望工具提示图标 (?) 位于“请告诉我们您接下来几天有空的时间”旁边。这是一张图片来解释

enter image description here

最佳答案

我找到了答案

基本上我已经告诉段落和 div 都像这样向左浮动

HTML

<p class="information-section tooltipster-information-section">Please tell us what hours you are available the following days.</p>
<div class="tool-tipster" title="“IE: 2pm-5pm or All Day”"></div>

CSS

.form__primary.form__two-column .tooltipster-information-section {
    float: left;
}
.form__primary.form__two-column .tooltipster-icon{
    float: left;
}

适用于我所有的浏览器

关于jquery - 将 jquery ui 工具提示图标与文本对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25379416/

相关文章:

javascript - 如何在 jQuery 中保留 keyup 事件的第一个原始值

javascript - 如何为同一个类的多个元素设置不同的位置

html - 是否可以在输入的占位符后添加一个伪选择器

css - 浏览器之间对盒子模型的不同解释

CSS - 在打印时管理分页符

javascript - 填充背景颜色,然后叠加一个PNG

jquery - 如何使用 jquery 将 span 附加到 html 中存在的 span?

javascript - 如何在键盘事件之外读取键盘状态?

html - 使用 Gstreamer 将视频流发送到浏览器

javascript - 页面加载时获取位置