gpt4 book ai didi

html - 将单独的 DIV 宽度对齐到相等的大小

转载 作者:行者123 更新时间:2023-11-28 00:42:47 25 4
gpt4 key购买 nike

这是我的 site
在首页你可以看到标题图片 DIV class="row"
现在在它下面,是两个 bpx productAz Lily
但是 DIV 宽度与横幅宽度不同。
我试图将所有 DIV 调整为相等的宽度,但只有 TOP DIV 不适合。它比页面 DIV 的其余部分小一点。
我试过将 DIV 的宽度设置为 100%,也尝试将 max-width 设置为 100%
(来自其他帖子),但没有白费运气。
我附上了它的CSS和HTML。

p.stagingsite {
font-size: 15px;
border: solid 2px red;
font-weight: 700;
color: red;
text-align: center;
}

.category-nav ul
{
display:block;
}


.blockscol
{
margin: 5px;
width: 250px;
height: 254px;
float: left;
/* border: solid 1px #eaeaea; */
padding: 9px 9px 5px 9px;
margin-left: 21px;
}


/*Background Header */
#header
{
background: url(http://azlily.bex.jp/eccube_1/html/template/default/img/background/BG.jpg) ;
}

/*Search By Keyword*/
.input_search.clearfix
{
display: none;
}


/*background contend Mid Section */
#contents
{
background: url(http://azlily.bex.jp/eccube_1/html/template/default/img/background/BG.jpg) ;
}

/*body template */

#contents_bottom {
/*border : solid;*/
/*background: #ffffff;*/
/*padding-bottom: 80px;*/
margin-top: -36px;
}

/*top Search bar*/
select#category_id {
background: none;
}

.row_bottom {
background: white;
height: 480px;
margin-top: 21px;
}

.imgcontroller
{
float: left;
margin: 0 33px 0 0;

}

@media only screen and (max-width: 600px) {
.imgcontroller
{
margin-left: -26px;
display: inline-grid;
margin-left: 0 0 5px 0 ;
}

}
<div id="contents" class="theme_main_only">

<div id="contents_top">
</div>

<div class="container-fluid inner">

<div id="main">
<div id="main_middle">
<p class="stagingsite">Staging Site_ステージングサイト</p>
<div class="row">
<div class="col-sm-12">
<div class="main_visual">
<div class="item">
<a href="http://azlily.bex.jp/eccube_1/html/products/list"> <img src="http://azlily.bex.jp/eccube_1/html/template/default/img/toppageimage/toppageimg.jpg"></a>
</div>
</div>
</div>
</div>



</div>

</div>

最佳答案

删除行和 col-sm-12 div

p.stagingsite {
font-size: 15px;
border: solid 2px red;
font-weight: 700;
color: red;
text-align: center;
}

.category-nav ul {
display: block;
}

.blockscol {
margin: 5px;
width: 250px;
height: 254px;
float: left;
/* border: solid 1px #eaeaea; */
padding: 9px 9px 5px 9px;
margin-left: 21px;
}


/*Background Header */

#header {
background: url(http://azlily.bex.jp/eccube_1/html/template/default/img/background/BG.jpg);
}


/*Search By Keyword*/

.input_search.clearfix {
display: none;
}


/*background contend Mid Section */

#contents {
background: url(http://azlily.bex.jp/eccube_1/html/template/default/img/background/BG.jpg);
}


/*body template */

#contents_bottom {
/*border : solid;*/
/*background: #ffffff;*/
/*padding-bottom: 80px;*/
margin-top: -36px;
}


/*top Search bar*/

select#category_id {
background: none;
}


/*.row {
background: white;
}*/

.row_bottom {
background: white;
height: 480px;
margin-top: 21px;
}

.imgcontroller {
float: left;
margin: 0 33px 0 0;
}

@media only screen and (max-width: 600px) {
.imgcontroller {
margin-left: -26px;
display: inline-grid;
margin-left: 0 0 5px 0;
}
}
<div id="contents" class="theme_main_only">

<div id="contents_top">
</div>

<div class="container-fluid inner">

<div id="main">

<div id="main_middle">
<p class="stagingsite">Staging Site_ステージングサイト</p>

<div class="main_visual">
<div class="item">
<a href="http://azlily.bex.jp/eccube_1/html/products/list"> <img src="http://azlily.bex.jp/eccube_1/html/template/default/img/toppageimage/toppageimg.jpg"></a>
</div>
</div>



</div>

</div>

关于html - 将单独的 DIV 宽度对齐到相等的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53718052/

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