<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									ヘッダーを固定する - 要望				            </title>
            <link>https://wp-cocoon.com/community/demands/%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%82%92%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b/</link>
            <description>Cocoon ディスカッション掲示板</description>
            <language>ja</language>
            <lastBuildDate>Mon, 09 Mar 2026 21:16:19 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: ヘッダーを固定する</title>
                        <link>https://wp-cocoon.com/community/demands/%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%82%92%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b/#post-61520</link>
                        <pubDate>Sun, 08 May 2022 00:36:04 +0000</pubDate>
                        <description><![CDATA[ありがとうございます。
span:target{
	padding-top: 80px;
	margin-top:-80px;
	}
こちらで対応させていただきました。]]></description>
                        <content:encoded><![CDATA[<p>ありがとうございます。</p>
<pre contenteditable="false">span:target{
	padding-top: 80px;
	margin-top:-80px;
	}</pre>
<p>こちらで対応させていただきました。</p>
<p> </p>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/demands/">要望</category>                        <dc:creator>Berghilo</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/demands/%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%82%92%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b/#post-61520</guid>
                    </item>
				                    <item>
                        <title>RE: ヘッダーを固定する</title>
                        <link>https://wp-cocoon.com/community/demands/%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%82%92%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b/#post-61519</link>
                        <pubDate>Sun, 08 May 2022 00:31:10 +0000</pubDate>
                        <description><![CDATA[@berghilo さん
独自のidは目次の上に設定されていらっしゃるご様子ですので、目次の見出しではアンカーの位置が少し異なるため、同じ80pxだとピッタリご希望に合った位置にならないのかもしれません。
 
目次のジャンプ位置の問題については現状では「ヘッダーが画面上から降りてくるまでの間」だけなので、あまり気にしないくても良いのかもしれません。
 
当初のご質問の...]]></description>
                        <content:encoded><![CDATA[<p>@berghilo さん</p>
<p>独自のidは目次の上に設定されていらっしゃるご様子ですので、目次の見出しではアンカーの位置が少し異なるため、同じ80pxだとピッタリご希望に合った位置にならないのかもしれません。</p>
<p> </p>
<p>目次のジャンプ位置の問題については現状では「ヘッダーが画面上から降りてくるまでの間」だけなので、あまり気にしないくても良いのかもしれません。</p>
<p> </p>
<p>当初のご質問の内容であれば、</p>
<pre contenteditable="false">:target {</pre>
<p>もしくは、</p>
<pre contenteditable="false">span {</pre>
<p>でも、目的には叶っているような気がします。</p>
<p> </p>
<p>今回Akiraさんが:target属性について、ご案内くださったので、ご自身でも調べて工夫することで、選択肢が増えたということかと思います。</p>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/demands/">要望</category>                        <dc:creator>リフィトリー</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/demands/%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%82%92%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b/#post-61519</guid>
                    </item>
				                    <item>
                        <title>RE: ヘッダーを固定する</title>
                        <link>https://wp-cocoon.com/community/demands/%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%82%92%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b/#post-61518</link>
                        <pubDate>Sun, 08 May 2022 00:14:34 +0000</pubDate>
                        <description><![CDATA[リフィトリーさん、
度重なるご指摘、ありがとうございます。
span　はやめて
:target {
  margin-top: -80px;
  padding-top: 80px;
}
これのみにした方がよろしいのでしょうか？
何度もすみません。]]></description>
                        <content:encoded><![CDATA[<p>リフィトリーさん、</p>
<p>度重なるご指摘、ありがとうございます。</p>
<p>span　はやめて</p>
<pre contenteditable="false">:target {
  margin-top: -80px;
  padding-top: 80px;
}</pre>
<p>これのみにした方がよろしいのでしょうか？</p>
<p>何度もすみません。</p>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/demands/">要望</category>                        <dc:creator>Berghilo</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/demands/%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%82%92%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b/#post-61518</guid>
                    </item>
				                    <item>
                        <title>RE: ヘッダーを固定する</title>
                        <link>https://wp-cocoon.com/community/demands/%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%82%92%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b/#post-61517</link>
                        <pubDate>Sat, 07 May 2022 23:53:41 +0000</pubDate>
                        <description><![CDATA[@berghilo さん
もともと、目次のジャンプ位置については、ご質問の主な目的ではなかったのかもしれません。
ただ、固定ヘッダーが画面上から降りてくる前に、目次の項目をクリックすると、現状ではターゲットの見出しがヘッダーに隠れてしまうようですので、Akiraさんのご提案の方がそれも含めて修正されるようなので、その方が良いかな、と思った次第です。
 
[id^=&quot;jo...]]></description>
                        <content:encoded><![CDATA[<p>@berghilo さん</p>
<p>もともと、目次のジャンプ位置については、ご質問の主な目的ではなかったのかもしれません。</p>
<p><br /><br />ただ、固定ヘッダーが画面上から降りてくる前に、目次の項目をクリックすると、現状ではターゲットの見出しがヘッダーに隠れてしまうようですので、Akiraさんのご提案の方がそれも含めて修正されるようなので、その方が良いかな、と思った次第です。</p>
<p> </p>
<pre contenteditable="false">:target ｛</pre>
<p><br />ですと目次は含まれないので、セレクタを</p>
<p> </p>
<pre contenteditable="false">:target {</pre>
<p><br />だけにすると目次のジャンプ位置も修正されたりしませんか？</p>
<p> </p>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/demands/">要望</category>                        <dc:creator>リフィトリー</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/demands/%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%82%92%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b/#post-61517</guid>
                    </item>
				                    <item>
                        <title>RE: ヘッダーを固定する</title>
                        <link>https://wp-cocoon.com/community/demands/%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%82%92%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b/#post-61516</link>
                        <pubDate>Sat, 07 May 2022 19:57:40 +0000</pubDate>
                        <description><![CDATA[再度のご指摘、ありがとうございます。
:target
に致しました。
よろしくお願いします。]]></description>
                        <content:encoded><![CDATA[<p>再度のご指摘、ありがとうございます。</p>
<p>:target</p>
<p>に致しました。</p>
<p>よろしくお願いします。</p>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/demands/">要望</category>                        <dc:creator>Berghilo</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/demands/%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%82%92%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b/#post-61516</guid>
                    </item>
				                    <item>
                        <title>RE: ヘッダーを固定する</title>
                        <link>https://wp-cocoon.com/community/demands/%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%82%92%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b/#post-61514</link>
                        <pubDate>Sat, 07 May 2022 15:15:04 +0000</pubDate>
                        <description><![CDATA[span　
だけだと、やっぱり目次のジャンプ位置が含まれないので、Akiraさんに最初にご案内いただいた
:target {
  margin-top: -80px;
  padding-top: 80px;
}
が一番いいのかもしれません。]]></description>
                        <content:encoded><![CDATA[<pre contenteditable="false">span　</pre>
<p>だけだと、やっぱり目次のジャンプ位置が含まれないので、Akiraさんに最初にご案内いただいた</p>
<pre contenteditable="false">:target {
  margin-top: -80px;
  padding-top: 80px;
}</pre>
<p>が一番いいのかもしれません。</p>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/demands/">要望</category>                        <dc:creator>リフィトリー</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/demands/%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%82%92%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b/#post-61514</guid>
                    </item>
				                    <item>
                        <title>RE: ヘッダーを固定する</title>
                        <link>https://wp-cocoon.com/community/demands/%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%82%92%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b/#post-61513</link>
                        <pubDate>Sat, 07 May 2022 14:25:48 +0000</pubDate>
                        <description><![CDATA[Akiraさんにご紹介いただいた「:target」を使うやり方ですと、
:target {
   margin-top: -80px;
   padding-top: 80px;
}
となるのかもしれません。]]></description>
                        <content:encoded><![CDATA[<p>Akiraさんにご紹介いただいた「:target」を使うやり方ですと、</p>
<pre contenteditable="false">:target {
   margin-top: -80px;
   padding-top: 80px;
}</pre>
<p>となるのかもしれません。</p>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/demands/">要望</category>                        <dc:creator>リフィトリー</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/demands/%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%82%92%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b/#post-61513</guid>
                    </item>
				                    <item>
                        <title>RE: ヘッダーを固定する</title>
                        <link>https://wp-cocoon.com/community/demands/%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%82%92%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b/#post-61512</link>
                        <pubDate>Sat, 07 May 2022 11:51:44 +0000</pubDate>
                        <description><![CDATA[皆様ありがとうございます。
idは歌手名でいきたいので、span　にして-の後に歌手名ローマ字をつなげました。
色々と親切なご指摘ありがとうございました。]]></description>
                        <content:encoded><![CDATA[<p>皆様ありがとうございます。</p>
<p>idは歌手名でいきたいので、span　にして-の後に歌手名ローマ字をつなげました。</p>
<p>色々と親切なご指摘ありがとうございました。</p>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/demands/">要望</category>                        <dc:creator>Berghilo</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/demands/%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%82%92%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b/#post-61512</guid>
                    </item>
				                    <item>
                        <title>RE: ヘッダーを固定する</title>
                        <link>https://wp-cocoon.com/community/demands/%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%82%92%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b/#post-61507</link>
                        <pubDate>Sat, 07 May 2022 10:21:34 +0000</pubDate>
                        <description><![CDATA[投稿者:: @akira 
記事内の全ての span に適用されるため、意図しないスタイルになる部分が必ず出てきます。

@berghilo さん
これはAkiraさんの仰るとおりかなと感じます。
 
私は「:target」についてはよくわかりませんので、セレクタを
span {
のようにして、
の「hogehoge」の部分は独...]]></description>
                        <content:encoded><![CDATA[<blockquote data-userid="147" data-postid="61505" data-mention="akira">
<div class="wpforo-post-quote-author"><strong> 投稿者:: @akira </strong></div>
<p>記事内の全ての span に適用されるため、意図しないスタイルになる部分が必ず出てきます。</p>
</blockquote>
<p><a title="Berghilo" href="https://wp-cocoon.com/community/profile/berghilo/" target="_self">@berghilo</a> さん</p>
<p>これはAkiraさんの仰るとおりかなと感じます。</p>
<p> </p>
<p>私は「:target」についてはよくわかりませんので、セレクタを</p>
<pre contenteditable="false">span {</pre>
<p>のようにして、</p>
<p>の「hogehoge」の部分は独自のものにして、利用するidは「id="hogehoge01"」「id="hogehoge02"」のようにしたらどうだろうかなどと思ったりしています。</p>
<p> </p>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/demands/">要望</category>                        <dc:creator>リフィトリー</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/demands/%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%82%92%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b/#post-61507</guid>
                    </item>
				                    <item>
                        <title>RE: ヘッダーを固定する</title>
                        <link>https://wp-cocoon.com/community/demands/%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%82%92%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b/#post-61505</link>
                        <pubDate>Sat, 07 May 2022 10:04:39 +0000</pubDate>
                        <description><![CDATA[@berghilo さん
そのセレクターはまずいです。記事内の全ての span に適用されるため、意図しないスタイルになる部分が必ず出てきます。
このような場合は、:target 擬似クラスの使用がおすすめです。この :target 擬似クラスは、URL の識別子（#〇〇のこと）に一致する id が対象です。
:target {
  margin-top: -80px;...]]></description>
                        <content:encoded><![CDATA[<p>@berghilo さん</p>
<p>そのセレクターはまずいです。記事内の全ての span に適用されるため、意図しないスタイルになる部分が必ず出てきます。</p>
<p>このような場合は、:target 擬似クラスの使用がおすすめです。この :target 擬似クラスは、URL の識別子（#〇〇のこと）に一致する id が対象です。</p>
<pre contenteditable="false">:target {
  margin-top: -80px;
  padding-top: 80px;
}</pre>
<p>見出しのみに適用する場合は、属性セレクターに :target 擬似クラスを使います。</p>
<pre contenteditable="false">:target {
  margin-top: -80px;
  padding-top: 80px;
}

/* もしくはこちらでも可 */
/* :target {
  margin-top: -80px;
  padding-top: 80px;
} */</pre>
<p>尚、子テーマの style.css の 3719 行目にエラーがあります。修正しない限り、これ以降の CSS が適用されないかもしれません。</p>
<div id="wpfa-28995" class="wpforo-attached-file"><a class="wpforo-default-attachment" title="target.png" href="//wp-cocoon.com/wp-content/uploads/wpforo/default_attachments/1651917879-target.png" target="_blank" rel="noopener"><i class="fas fa-paperclip"></i> target.png</a></div>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/demands/">要望</category>                        <dc:creator>Akira</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/demands/%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%82%92%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b/#post-61505</guid>
                    </item>
							        </channel>
        </rss>
		