gpt4 book ai didi

html - 两列 - 图像、文本 - 对齐不起作用

转载 作者:太空宇宙 更新时间:2023-11-04 12:33:57 24 4
gpt4 key购买 nike

我不知道我做错了什么......

我在 CSS 中有这个:

.teamblock {
position: relative;
}
.teamimage {
float:left;
width:20%
}
.teamtext {
float: left;
padding: 10px;
width:60%;
}

在html中,我的结构如下:

<div class="teamblock">
<div class="teamimage">
<img src="some image">
</div>
<div class="teamtext">
Some text
</div>
</div>

起初它似乎工作正常。但是请看这里:

http://dev.pfp-consortium.org/index.php/about/meet-our-team

我不知道这是怎么可能的...

谢谢!

最佳答案

这也适用于白色宽度

所以你有:

.teamblock{
position: relative;
display: inline-block;
overflow: hidden;
margin: 5px;
width: 100%;
background: #ffffff;
}

它对我有用,请参阅: enter image description here

关于html - 两列 - 图像、文本 - 对齐不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27423525/

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