下記のリンクをご確認頂きたいのですが、
サイトの右側のメインページに商品画像を4つ×2列にしたいのですが、左下の一つだけズレた位置に配置されてしまっております。これを修正するにはそうすればよろしいでしょうか?
<画像URL>
https://gyazo.com/e222bc8fe004953853a9a764aaf1fab3
<!DOCTYPE HTML> <html lang="ja"> <head> <meta http-equiv="Content-Language" content="ja"> <meta http-equiv="Content-Type" content="text/html; charset=shift_jis"> <meta http-equiv="Content-Style-Type" content="text/css">--> <!--グリッドサイトの記載 L9-L11まで--!> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]--> <link rel="stylesheet" href="../style/mainbox-style.css"/> <script src="../js/modernizr-transitions.js"></script> <meta charset="utf-8"> <link rel="stylesheet" href="../style/style.css" type="text/css"> <title>PRESENT ME</title> </head> <body id="yellow"> <div id="leftbox"> <h1>PRESENT ME</h1> <dl> <!--<div id="header"><!--ヘッダ--> <dd><a href="/ドットインストール/login.php">ログイン</a><br> <a><a href="/ドットインストール/index.php">新規登録</a></dd> </dl> <div id="menu"><!--左ナビゲーション--> <dl id="myPage"><dt>マイページ</dt> <dd> <img src="images/photo11.png"/> <ul> <li><a href="#">お気に入り</a></li> <li><a href="#">ともだちを検索</a></li> <li><a href="#">ともだちのお気に入り</a></li> <li><a href="#">アカウント情報</a></li> </ul></dd></dl> <ul id="menuLinks"> <li><a href="#"><strong>プレゼント診断</storong></a></li> </ul> </div> </div> <div id="mainbox"> <h3> ITEM LINEUP</h3> <div class="main_text"> <body class="homepage"> <section id="content"> <div id="container" class="transitions-enabled clearfix"> <!-- #content -->HTML
1コード
<!--文字数制限のため、アフリエイト画像のリンクを貼っておりましたが、削除しました。--><div class="item link"> <input type="checkbox">check!
<!--文字数制限のため、アフリエイト画像のリンクを貼っておりましたが、削除しました。--><!--<img src="images/photo01.jpg" width="180" height="278">--> </div> <div class="item link"> <input type="checkbox">check!
<!--文字数制限のため、アフリエイト画像のリンクを貼っておりましたが、削除しました。--> </div> <div class="item link"> <input type="checkbox">check! <!--<img src="images/photo06.jpg" width="180" height="126"><br>--> <div class="item link"> <input type="checkbox">check! </div> <!--文字数制限のため、アフリエイト画像のリンクを貼っておりましたが、削除しました。--> <div class="item link"><!--文字数制限のため、アフリエイト画像のリンクを貼っておりましたが、削除しました。--> <input type="checkbox">check! <!--文字数制限のため、アフリエイト画像のリンクを貼っておりましたが、削除しました。--> </div> <div class="item link"> <!--文字数制限のため、アフリエイト画像のリンクを貼っておりましたが、削除しました。--> </div> <div class="item link"> <!--文字数制限のため、アフリエイト画像のリンクを貼っておりましたが、削除しました。--> </div> <div class="item link"> <input type="checkbox">check! <!--文字数制限のため、アフリエイト画像のリンクを貼っておりましたが、削除しました。--> </div> <div class="item link"> <input type="checkbox">check! <!--文字数制限のため、アフリエイト画像のリンクを貼っておりましたが、削除しました。--> </div> <script src="../js/jquery-1.7.1.min.js"></script> <script src="../js/jquery.masonry.min.js"></script> <script> $(function(){ var $container = $('#container'); $container.masonry({ itemSelector: '.item', columnWidth: 350, isAnimated: !Modernizr.csstransitions }); // dynamically load sites using Masonry from Zootool $.getJSON('http://zootool.com/api/users/items/?username=desandro' + '&apikey=8b604e5d4841c2cd976241dd90d319d7' + '&tag=bestofmasonry&callback=?') .error(ajaxError) .success(function( data ){}); }); </script> </section> </div> </body> </html></div> <div class="item link"> <input type="checkbox">check! <!--<img src="images/photo03.jpg" width="180" height="124"><br>--> <!--文字数制限のため、アフリエイト画像のリンクを貼っておりましたが、削除しました。--> </div> <div class="item link"> <input type="checkbox">check! <!--<img src="images/photo04.jpg" width="180" height="120"><br>--> <!--文字数制限のため、アフリエイト画像のリンクを貼っておりましたが、削除しました。--> </div> <div class="item link"> <input type="checkbox">check! <!--<img src="images/photo05.jpg" width="180" height="120"><br>-->
CSS
1コード
/**** Base styles ****/
@charset "utf-8";
.item link button{
font-size: 1px
}
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video {
margin: 0;
padding-top: 5px;
padding-right: 5px;
padding-left: 5px;
padding-bottom: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
display: block;
}
html {
overflow-y: scroll;
}
body {
font: 13px 'Helvetica Neue', Arial, sans-serif;
color: #222;
line-height: 1.6em;
background-color: #F7F5F4;
}
a {
color: #A2C;
text-decoration: none;
}
a:hover {
color: #D26;
}
a:active {
background: hsla( 0, 100%, 100%, 0.5 );
}
h1, h2 {
font-weight: 100;
line-height: 1.6em;
margin-bottom: 0.6em;
}
h1 {
font-size: 28px;
color: #366C81;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 30px;
text-decoration: underline;
}
h2 {
font-size: 24px;
}
h3 {
font-size: 17px;
font-weight: bold;
}
h3, p, ul, ol, pre, dl {
margin-bottom: 1.0em;
}
strong {
font-weight: bold;
}
/* screens smaller than 640 */
@media screen and (max-width: 640px) {
#content {
padding: 10px;
}
}
a img {
border: none;
}
blockquote {
margin: 0;
font: italic 18px Georgia, serif;
}
dt {
font-weight: bold;
font-size: 14px;
}
dd + dt {
margin-top: 0.5em;
}
dd {
margin-left: 1.0em;
}
#container {
background: #FFF;
padding: 5px;
margin-bottom: 20px;
border-radius: 5px;
clear: both;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
/**** Transitions ****/
.transitions-enabled.masonry,
.transitions-enabled.masonry .masonry-brick {
-webkit-transition-duration: 0.7s;
-moz-transition-duration: 0.7s;
-o-transition-duration: 0.7s;
transition-duration: 0.7s;
}
.transitions-enabled.masonry {
-webkit-transition-property: height, width;
-moz-transition-property: height, width;
-o-transition-property: height, width;
transition-property: height, width;
}
.transitions-enabled.masonry .masonry-brick {
-webkit-transition-property: left, right, top;
-moz-transition-property: left, right, top;
-o-transition-property: left, right, top;
transition-property: left, right, top;
}
.homepage .item {
width: 200px;
float: left;
padding: 50px;
margin: 10px;
font-weight: 300;
-webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 30px; background-color:#FFFFFF; /*#CCCCCC;*/
}
.homepage .big-text, .homepage .link {
font-size: 20px;
line-height: 1.2em;
}
.homepage .big-text{
height:5px;
text-overflow: ellipsis;
white-space: nowrap;
-o-text-overflow: ellipsis;
overflow: hidden;
}
.homepage .link {
padding: 0;
word-wrap: break-word ;
-moz-word-wrap: break-word ;
}
.homepage .link a {
display: block;
padding: 20px;
width: 150px;
background: #BEDAE4;
color: #FFFFFF;
-webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 30px;
}
.homepage .link a:hover {
background-color: #A0C9D8;
}
/**** Clearfix ****/
.clearfix:before, .clearfix:after {
content: "";
display: table;
}
.clearfix:after {
clear: both;
}
.clearfix {
zoom: 1;
}
.item link img {
margin-top: 10px;
margin-bottom: 10px;
}
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/10/26 10:48
2015/10/26 10:49
2015/10/26 10:50