前提・実現したいこと
スクラッチでホームページを作成しています。
発生している問題・エラーメッセージ
画像をクリックするとポップアップ可能なコードを記述し、成功しているのですが、
画像からはみ出る点線のポップアップのリンクが表示されてしまいます。
どのようにすれば画像からリンクがはみ出ることなく表示できるのでしょうか。
※黄色の箇所です。
該当のソースコード
HTML <div class="outer"> <div class="inner"> 大タイトル </div> </div> <div class="outer2"> <div class="inner2"> <div class="hinagata"> <h3>大タイトル説明文</h3> <h4>小タイトル</h4><br> <h3>小タイトル説明文 <div class="panf"> <a class="popup" href="../img/img1.jpg"><img src="../img/img1-small.jpg" width="auto" height="auto" alt="画像1"></a> </div> 小タイトル説明文</h3> </div> </div> </div>
CSS /* トップページ以外のひな形 */ .hinagata {padding: 20px; border: solid 5px #ffffff; background-color: #ffffff} .hinagata h4 {padding: 0.25em 0.5em;/*上下 左右の余白*/ color: #494949;/*文字色*/ font-size: 24px;/*文字サイズ*/ background: transparent;/*背景透明に*/ border-left: solid 5px #BDB76B;/*左線*/ } .hinagata h1 {margin-top: 0; margin-bottom: 0px; font-size: 24px; color: #494949} .hinagata h2 {margin-top: 0px; text-align: center; margin-bottom: 5px; font-size: 32px; color: #494949} .hinagata h3 {margin-top: 10px; margin-bottom: 15px; font-size: 18px; color: #494949} .hinagata h5 {margin-top: 0; margin-bottom: 5px; font-size: 18px; color: #BDB76B} .hinagata h6{ margin-top: 25px; margin-bottom: 30px; position: relative; padding: 0.5em; background: #BDB76B; color: #494949; } .hinagata h6:before { position: absolute; content: ''; top: 100%; left: 0; border: none; border-bottom: solid 15px transparent; border-right: solid 20px rgb(149, 158, 155); } .hinagata a { padding: 5px; border-bottom: dotted 2px #BDB76B; color: #000000; font-size: 14px; text-decoration: none} .hinagata ul {margin: 0; padding: 0; list-style: none} .hinagata li a:hover {background-color: #eeeeee} .hinagata time {color: #888888; font-weight: bold} .hinagata a:after {content: ""; display: block; clear: both} .hinagata time {float: left; width: 60px} .hinagata .text {float: none; width: auto; margin-left: 60px} /*メインコンテンツ(トップページ以外)のタイトル*/ .inner{ text-align: center; } .inner{ width: 80%; margin: 15px auto; padding-bottom: 30px; max-width: 700px; border-bottom: 6px solid #BDB76B; } .outer{ text-align: center; } .inner{ display: inline-block; text-align: center; font-size: 38px; } .outer {padding-top: 30px; padding-bottom: 0px} //*メインコンテンツ(トップページ以外)のコンテンツ*// .inner2{ text-align: center; } .inner2{ width: 80%; margin: 0 auto; max-width: 700px; } .outer2{ text-align: center; } .inner2{ display: inline-block; text-align: left; font-size: 24px; } .outer2 {padding-top: 30px; padding-bottom: 10px} .carousel-inner img { width: 100%; } #carousel-example-generic { width: 100%; }
補足情報(FW/ツールのバージョンなど)
ポップアップはjQueryプラグイン「magnific-popup」を使用しています。
参考書などを見ながら作成している素人なので不足点などあるかと思いますが、
教えていただけますと幸いです。
プログラムコード(およびエラーメッセージ)は質問内容としては最も重要な部分であるため、見やすくしていただけると助かります。<code>ボタン押下→「コード」部分にコードを貼り付け→「ここに言語を入力」に対象言語名記入(エラーメッセージの場合は不要)の手順で「コードハイライト化」してください。(質問編集画面ではリアルタイムでプレビューが表示されるので見ながら調整してください)
またhtmlだけでは再現確認がとれませんので関係個所のコードをなるべくすべてご提示ください。
ありがとうございます。修正いたします。
画像から点線がはみ出ているのはポップアップ前ですかポップアップ後ですか??
ポップアップ前です。
タイトルにある「>リンク可能な点線」の部分は、提示コードにありますか?