[IPython-dev] Examples of custom CSS for side-by-side (horizontal) output layout?

Matthias Bussonnier bussonniermatthias at gmail.com
Fri Jul 4 09:03:41 EDT 2014


Including css with %html follow normal css rules. Last in the dom take precedence (assuming same target specificity) what you see is not astonishing, and is one of the reason style should not be applied by displaying things in cells.
-- 
M

Envoyé de mon iPhone

> Le 4 juil. 2014 à 14:32, Doug Blank <doug.blank at gmail.com> a écrit :
> 
>> On Thu, Jul 3, 2014 at 2:50 AM, Matthias Bussonnier <bussonniermatthias at gmail.com> wrote:
>> 
>>> Le 3 juil. 2014 à 04:52, Fernando Perez a écrit :
>>> 
>>> Hi folks,
>>> 
>>> I know in the past people have mentioned having customized their notebook layouts to display output next to the input cells instead of below them.
>>> 
>>> Does anyone have an example handy of this, so I can refer a colleague to it?
>> 
>> 
>> %%html
>> <style>
>> div.cell{
>> 	box-orient:horizontal;
>> 	flex-direction:row;
>> }
>> 
>> div.cell *{
>> 	width:100%;
>> }
>> 
>> div.prompt{
>> 	width:80px;
>> 
>> }
>> </style>
> 
> BTW, I find that I can go back and forth between horizontal and vertical styles sequentially in a notebook using this technique, as long as the HTML is entered into new cells. If I go back to a previously executed cell and attempt to re-run the HTML, then the notebook gets confused, and I need to create a new cell (or close and re-open the notebook). This is on Chromium 34.0.1847.116 on Ubuntu.
> 
> -Doug
>  
>> 
>> CF : https://twitter.com/Mbussonn/status/474189448452665344
>> 
>> -- 
>> M
>>> 
>>> Thanks!
>>> 
>>> f
>> 
>> 
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
> 
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140704/2284c2bc/attachment.html>


More information about the IPython-dev mailing list