0

Ok , I am trying to modify nbconvert template in order to change some style when coverting to html using template , (that I am new to, and it said it's in Jinja template style)

here's the code (of problem) in full.tpl:

{% block markdowncell  %}
<p dir="rtl" style="text-align:right;">
{{ super() }}
</p>
{% endblock markdowncell %}

it should include the cell inside right-aliged text, put the result after many tries is the same (first run worked , then I changed sth ,and it broke)

in the browser it shows that the

close before the content , like this:

<p .. > </p>
<div> ... </div> <!-- that should be inside p tag which is `{{super()}}`-->

div tag ,however, would work , but i need dir=rtl also.

The complete code is here

any help would be appricated , I spend a lot of time on it, with no use, :(

Yasin Yousif
  • 969
  • 7
  • 23
  • 4
    use
    instead of

    tag..this can be help you: https://stackoverflow.com/questions/8397852/why-p-tag-cant-contain-div-tag-inside-it

    – Manish Patel Nov 02 '17 at 12:45
  • @ManishPatel ok , that, explain but didn't solve ,is there a css style equlivent to dir='rtl' in

    but for

    , I have no access to the inner
    ...
    – Yasin Yousif Nov 02 '17 at 12:54
  • @YasinYousif Please read the [docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir): _The `dir` **global attribute** is an enumerated attribute..._ So it should work with DIV, and you can alwyas use simple and basic CSS: `.rtl {direction: rtl;}` and apply the `rtl` class on the relevan element in the DOM – Alon Eitan Nov 02 '17 at 12:57

0 Answers0