简体   繁体   中英

<code> tag not styling properly in ipython notebook

I'm trying to use the <code> tag in a markdown cell of an ipython notebook. However the expected styling behavior is being over written:

renderinghtml.less

I've tried:

  • over writing the default custom.css per here : doesn't work
  • add a custom code cell that loads a custom.css per here : doesn't work
  • adding a <style> definition within the cell containing the <code> tag: doesn't work
  • adding the style in-line to the <code> tag: this works

Anyone know how I prevent this style from being over-written?

Looks like I was using the wrong tags to define the css; I followed the guide here and then set the CSS style with

.rendered_html code {
    padding:2px 4px;
    font-size: 90%;
    color: #c7254e;
    background-color: #f9f2f4;
    border-radius: 4px;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM