LoginSignup
3
4

More than 5 years have passed since last update.

Confluenceのサイドバーを隠したい

Posted at

やりたいこと

単純に、Confluenceのサイドバーを無くして画面いっぱいにコンテンツを表示したい...ということです。

方法:CSSでやっつける

動作に影響を与えたくない場合は、やはりCSSでの調整です。
こちらも、スペース単位でCSSを変更できるので、全体はそのままで良いけれど、自分のスペースだけ調整したいといった場合にお試し下さい。

Documentation themeの場合

前々のバージョンだと、Documentation Themeを使っている場合が多いかと思います。
こちらは、Atlassian AnswersにもQ&Aがありました。

css
#splitter-sidebar {
    width:0 !important;
}

#splitter-button, 
#splitter .vsplitbar {
    display:none !important;
}

Default theme(既定のテーマ)の場合

Confluence 5.x系だと、デフォルトテーマがDocumentation Themeではなくなった模様。
こちらについては上記のQ&Aでは回答が見つけられなかったので、いろいろ試したあげく、下記でなんとか消えました。

(CSSは得意ではありませんので添削いただけると幸いです...)

css
div.theme-default .ia-splitter #main {
    margin-left: 0px;
}
.ia-fixed-sidebar, .ia-splitter-left {
    display: none;
}
div#main {
    margin-left: 0px !important;
}
div#footer {
  margin-left: 0px !important;
}

スペースの下のあるページだけ適用させたい場合は?

多分、CSSを埋め込むマクロを登録して、ページの本文使えば消せるはず...。
HTMLマクロでも行けましたので、サンプルを載せておきます。

Confluence-page-source
<ac:structured-macro ac:name="html">
  <ac:plain-text-body><![CDATA[<style>
div.theme-default .ia-splitter #main {
    margin-left: 0px;
}
.ia-fixed-sidebar, .ia-splitter-left {
    display: none;
}
div#main {
    margin-left: 0px !important;
}
div#footer {
  margin-left: 0px !important;
}
</style>]]></ac:plain-text-body>
</ac:structured-macro>
3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4