前提・実現したいこと
ここに質問の内容を詳しく書いてください。
(例)PHP(CakePHP)で●●なシステムを作っています。
■■な機能を実装中に以下のエラーメッセージが発生しました。
グリッドレイアウトを以下のようにしましたが、うまくレイアウトされません。
あと、img画像をセンターに配置したいのですが、配置されません。。。
グリッドレイアウトは均等で3列x2行にしたいのですが。。
発生している問題・エラーメッセージ
エラーメッセージ
該当のソースコード
HTML
<div class="grid-containr"> <section class="item"> <div class="category"> <div class="title">Solution</div> <img class="catepic" class="title"Solution src="../pics/arvo-solution.png" width="400"height="250 alt=""> <div class="top-subtitle"></div><br> <p class="description"></p><br> <a href="./index.html" class="square_btn">詳しくはこちら</a></br> </div> </section> <section class="item"> <div class="category"> <div class="title">Access point</div> <img class="catepic" src="../pics/accesspoint.png" width="300"height="250"alt=""> <div class="top-subtitle"></div></br> <p class="description"></p></br><br> <a href="./accesspoint.html" class="square_btn">詳しくはこちら</a> </div> </section> .............................................CSS
.grid-containr{
display: grid;
grid-template: 450px 450px 450px/450px 450px 450px;
grid-row-gap:30px;
grid-column-gap: 50px;
}
.item {
position:relative;
padding-left:40px;
padding-right:40px;
margin-left:5px;
}
.category {
width: 450px;
margin-bottom:30px;
padding: 8px;
border: 1px solid #c0c0c0;
border-radius: 5px;
margin: 16px 9px 10px;
color: #2c2c2c;
background-color:#ffffff;
font-family:"Trebuchet MS" "Hiragino Kaku Gothic ProN", Meiyo, Sans-serif;
-ms-transform: translateY(4px);
-webkit-transform: translateY(4px);
transform: translateY(4px);/下に動く/
box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.2);/影を小さく/
}
.item .category ::before{
display: inline-block;
width: 19px;
}
.title{
color:#fb0101;
font-size:38px;
font-weight:bold;
margin-bottom: 10px;
padding-top:0px;
letter-spacing:1px;
text-align: left;
text-decoration: none;
font-family:"Trebuchet MS" "Hiragino Kaku Gothic ProN", Meiyo, Sans-serif;
}
.catepic img {
text-align:center;
}
.top-subtitle{
color:#2c2c2c;
font-size:20px;
font-weight:bold;
text-align: center;
margin-top:10px;
}
.description{
color:#000000;
font-size:15px;
position:center;
margin:0 0 5px 0;
}
.square_btn{
display:block;
padding: 0.5em 1em;
padding-left:10px;
text-decoration: none;
background: #fb0101;/ボタン色/
color: #fff;
font-style:bold;
border-bottom: solid 4px #999999;
border-radius: 10px;
margin-bottom: 5px
text-align:center;
widh:70px;
}
.square_btn:active {
-ms-transform: translateY(4px);
-webkit-transform: translateY(4px);
transform: translateY(4px);
box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.2);
border-bottom: none;
}
.square_btn:a hover {
-ms-transform: translateY(4px);
-webkit-transform: translateY(4px);
transform: translateY(4px);
box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.2);
border-bottom: none;
filter:alpha(opacity=100);
-moz-opacity: 1;
opacity: 1;
}
ソースコード
試したこと
ここに問題に対して試したことを記載してください。
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。