From: Steinar Bang <sb@dod.no>
To: emacs-orgmode@gnu.org
Subject: Re: org2blog: get horizontal scrollbar on code examples?
Date: Sat, 04 Apr 2020 15:56:22 +0200 [thread overview]
Message-ID: <86lfnbqrqx.fsf@dod.no> (raw)
In-Reply-To: <87369jmtf8.fsf@christianmoe.com> (Christian Moe's message of "Sat, 04 Apr 2020 12:33:47 +0200")
>>>>> Christian Moe <mail@christianmoe.com>:
> 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!
prev parent reply other threads:[~2020-04-04 13:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-04 9:34 org2blog: get horizontal scrollbar on code examples? Steinar Bang
2020-04-04 10:33 ` Christian Moe
2020-04-04 13:56 ` Steinar Bang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86lfnbqrqx.fsf@dod.no \
--to=sb@dod.no \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).