From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ns384221.ip-46-105-121.eu ([91.121.113.132]) by ns368062.ip-94-23-30.eu with LMTP id iLniMCaSiF5PHwwAbb5zcA (envelope-from ) for ; Sat, 04 Apr 2020 13:56:54 +0000 Received: from aspmx1.migadu.com ([91.121.113.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ns384221.ip-46-105-121.eu (Dovecot) with LMTP id 9j4gKSuRiF5ecAAAcqd/iQ ; Sat, 04 Apr 2020 15:56:54 +0200 Received: (Migadu outbound); Sat, 04 Apr 2020 15:56:54 +0200 Authentication-Results: aspmx1.migadu.com; iprev=pass; spf=pass smtp.mailfrom=gnu.org Received-SPF: Pass (aspmx1.migadu.com: domain of gnu.org designates 209.51.188.17 as permitted sender) receiver=aspmx1.migadu.com; identity=mailfrom; client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from= Received-SPF: None (aspmx1.migadu.com: domain of lists.gnu.org does not designate 209.51.188.17 as permitted sender) receiver=aspmx1.migadu.com; identity=helo; client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from= X-Haraka-FCrDNS: lists.gnu.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by aspmx1.migadu.com (Haraka/2.8.20) with ESMTPS id 746A893C-B125-40FD-A50F-110EC5436662.1 envelope-from (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 verify=FAIL); Sat, 04 Apr 2020 15:56:54 +0200 Received: from localhost ([::1]:38966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKjI2-0007xb-FY for larch@yhetil.org; Sat, 04 Apr 2020 09:56:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35333) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKjHg-0007xS-2W for emacs-orgmode@gnu.org; Sat, 04 Apr 2020 09:56:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jKjHe-0004pf-QV for emacs-orgmode@gnu.org; Sat, 04 Apr 2020 09:56:27 -0400 Received: from cadalora.default.sbang.uk0.bigv.io ([46.43.15.90]:41266 helo=cadalora.bang.priv.no) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jKjHe-0004p6-LA for emacs-orgmode@gnu.org; Sat, 04 Apr 2020 09:56:26 -0400 Received: from mccoy (cm-84.211.250.118.getinternet.no [84.211.250.118]) by cadalora.bang.priv.no (Postfix) with ESMTPSA id E6434CD40E for ; Sat, 4 Apr 2020 14:56:23 +0100 (BST) From: Steinar Bang To: emacs-orgmode@gnu.org Subject: Re: org2blog: get horizontal scrollbar on code examples? References: <86r1x3r3uq.fsf@dod.no> <87369jmtf8.fsf@christianmoe.com> Date: Sat, 04 Apr 2020 15:56:22 +0200 In-Reply-To: <87369jmtf8.fsf@christianmoe.com> (Christian Moe's message of "Sat, 04 Apr 2020 12:33:47 +0200") Message-ID: <86lfnbqrqx.fsf@dod.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 46.43.15.90 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Haraka-ASN: 22989 209.51.188.0/24 X-Rspamd-Score: -4.707989 X-TUID: qIn05RVo22+5 >>>>> Christian Moe : > Try adding > .org-src-container .src { overflow: auto; white-space: nowrap } > to the CSS, e.g.: > #+html_head_extra: 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!