Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Markdown Styles not Showing

Tags:

html

css

markdown

I am working on a application that takes user input in the form of Markdown and displays that input on a page. The markdown gets converted to HTML just fine but for some reason the bold and italics don't show on the display page. The html tags are there but they aren't rendering properly.

I am thinking its the styles that override the strong and i tags but I don't know how not to apply any styles to that area since I am using YUI Reset?

Any ideas would be appreciated.

Thank You!

like image 972
Lukasz Avatar asked Feb 16 '26 04:02

Lukasz


1 Answers

You have plenty of options...

You can just override the reset styles like so

<style type="text/css">
  strong {
    font-weight:bold;
  }

  i {
    font-style: italic;
  }
</style>

Alternatively if you are hosting the reset file locally you can just remove the rules that have turned off the above styling.

Lastly you could even change the markdown conversion to use <b> and <em> tags. You may even want to change it to use:

<span style="font-weight:bold">text</span>

etc.

like image 157
irishbuzz Avatar answered Feb 18 '26 18:02

irishbuzz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!