[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: org2blog: get horizontal scrollbar on code examples?
From: |
Steinar Bang |
Subject: |
Re: org2blog: get horizontal scrollbar on code examples? |
Date: |
Sat, 04 Apr 2020 15:56:22 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt) |
>>>>> Christian Moe <address@hidden>:
> Try adding
> .org-src-container .src { overflow: auto; white-space: nowrap }
> to the CSS, e.g.:
> #+html_head_extra: <style>.org-src-container .src { overflow: auto;
> white-space: nowrap }</style>
Thanks for the tip, Christian!
The "#+html_head_extra" example didn't work, because the SOAP and/or
wordpress HTML parser, strips off everything it doesn't like.
But I have wordpress premium, so I have the possibiliy of adding CSS:
https://wp.me/PEmnE-Bt
I tried adding:
.org-src-container .src {
overflow: auto;
white-space: nowrap;
}
and that gave me a scrollbar, but unfortunately everything is put on a
single line.
Removing "white-space: nowrap" gives me the line feeds back, but also
loses the horisontal scroll bar.
According to what google tells me
overflow: auto;
should be enough to get scrollbars...?
The pre element has
white-space: pre-wrap;
word-wrap: break-word;
are those the problem?
Hm... https://www.w3schools.com/cssref/pr_text_white-space.asp ?
Tried:
.org-src-container .src {
overflow: auto;
white-space: pre;
}
Yep! That worked!
Needed to get the same formatting on command line examples as well, so I
ended up with:
.org-src-container .src, .example {
overflow: auto;
white-space: pre;
}
Thanks again!