我是一个非技术背景的人。我想编辑我的网站的趋势页面,这样歌曲的标题就可以和它们在桌面和平板电脑上出现在同一行。我应该做些什么改变才能实现这一目标?如果有人能帮我,我会非常感激。
MobileDesktop
.home_trending {
background: #fff;
padding: 25px;
}
.inner_home_trending:nth-child(2n+1) {
clear: left;
}
.home_inner_details {
width: 70%;
display: inline-block;
vertical-align:middle;
padding-left: 15px;
}
.home_p p {
margin: 0px !important;
}
.home_p .module-head {
border-top: 6px solid #7464f2;
border-radius: 3px;
}
.img_back .header img,
.movie_fream img,
.main-post img{
background-image: url(https://themusicalsafari.com/wp-content/uploads/2020/07/border.jpeg);
background-size: cover;
padding: 25px 25px;
background-position: center;
background-repeat: no-repeat;
}
.textwidget .main-post img,
.music_img .main-post img {
padding:17px;
}
.home_inner_details h2 {
font-size: 18px;
padding-bottom: 5px;
}
.home_inner_details a {
color: #333;
font-weight: 600;
}
.inner_number {
width: 10%;
display: inline-block;
vertical-align:middle;
text-align: left;
font-size: 18px;
color: #ccc;
font-weight: 700;
}
.inner_img {
width: 18%;
display: inline-block;
vertical-align:middle;
}
.music_img .header {
padding: 15px;
}
.img_back .main-post h2.entry-title {
margin-right: 15px;
}
.img_back .main-post .entry-title,
.img_back .main-post .post-meta.vcard{
display:block;
vertical-align: middle;
}
.inner_home_trending {
width: 50%;
float: left;
padding: 15px;
border-bottom: 1px solid #ccc;
}
.main_meta_val p {
color: #666;
}
.main_meta_val span {
font-weight: 600;
}
.ly_text_center{
text-align:center;
margin-top: 20px !important;
}
.post_col_movies a.viewmore {
text-align: center;
width: 100%;
display: block;
color: #28aaab;
}
.movie_block .post-content span {
width: 100%;
text-align: center;
display: block;
}
正如我上面提到的,我对编码一无所知,尽管如此,我试图改变某些值,看看会发生什么,但我不能得到我想要的结果。
1条答案
按热度按时间kxxlusnw1#
尝试在包含照片和标题的元素上使用
flex-wrap: nowrap;
,这里最好使用https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap