One of my blog authors noticed that while text within <code> and <pre> tags is properly formatted in the Salient editor, when it is output on the page it not formatted correctly. Specifically, <code> adds line breaks while <pre> text is not fixed width. You can see an example here and I have also attached a screenshot, showing the output in the browser, with annotations.
Any help on how to overcome this issue would be appreciated, as the blog is filled with code examples. I am assuming it is a CSS fix ...
Thanks. This solved the <pre> issue, but the <code> still breaks out on its own line -- there shouldn't be any breaks before or after. You can see an example on http://jquery.in30minutes.com/serialize-un-serialize-form-data/ on the first paragraph, which should be a complete whole paragraph with fixed width fonts for the three terms bolded here:
A very common task in jQuery is to take data from your form and send it to a server for processing. This is done so often that it’s a surprise that there is no built in method to this cleanly for json requests. Although jQuery does provide the .serializeArray() method it doesn’t do quite what we want. It gives us an awkward array of data not suitable for sending along with the datajs on formatted parameter in $.ajaxcalls.
Instead, they are output on their own line (check the link I sent you). I am assuming it's a CSS fix to get rid of the unwanted breaks, could you tell me what it is?
Hi Tahir. There are two issues. I've attached an annotated screenshot of this blog post in Chrome.
Issue 1: As the blog post shows, the <code> text breaks out onto its own line (or paragraph?). This shouldn't happen -- the text within <code></code> should be monospace but part of the same paragraph that it's included in.
Issue 2: While Chrome shows correctly formatted <pre> text (see screenshot), in Firefox the formatting is broken -- no monospace text or gray background.
Any help on how to resolve both issues would be appreciated.
Hello,
One of my blog authors noticed that while text within <code> and <pre> tags is properly formatted in the Salient editor, when it is output on the page it not formatted correctly. Specifically, <code> adds line breaks while <pre> text is not fixed width. You can see an example here and I have also attached a screenshot, showing the output in the browser, with annotations.
Any help on how to overcome this issue would be appreciated, as the blog is filled with code examples. I am assuming it is a CSS fix ...
Thank you,
Ian
Hey!
Sure, Add this into the Custom CSS box located in your Salient Options panel :
ThemeNectar Support Team
Hello Tahir,
Thanks. This solved the <pre> issue, but the <code> still breaks out on its own line -- there shouldn't be any breaks before or after. You can see an example on http://jquery.in30minutes.com/serialize-un-serialize-form-data/ on the first paragraph, which should be a complete whole paragraph with fixed width fonts for the three terms bolded here:
A very common task in jQuery is to take data from your form and send it to a server for processing. This is done so often that it’s a surprise that there is no built in method to this cleanly for json requests. Although jQuery does provide the
.serializeArray()
method it doesn’t do quite what we want. It gives us an awkward array of data not suitable for sending along with thedata
js on formatted parameter in$.ajax
calls.Instead, they are output on their own line (check the link I sent you). I am assuming it's a CSS fix to get rid of the unwanted breaks, could you tell me what it is?
Thanks
Ian
Hey Ian!
Sorry but can you elaborate with a screenshot as i cant make sense of it.
Thanks
ThemeNectar Support Team
Hi Tahir. There are two issues. I've attached an annotated screenshot of this blog post in Chrome.
Issue 1: As the blog post shows, the <code> text breaks out onto its own line (or paragraph?). This shouldn't happen -- the text within <code></code> should be monospace but part of the same paragraph that it's included in.
Issue 2: While Chrome shows correctly formatted <pre> text (see screenshot), in Firefox the formatting is broken -- no monospace text or gray background.
Any help on how to resolve both issues would be appreciated.
Thanks
Ian
Hey!
Sorry for the delay, Please add this revised code so i can check it on Firefox :
Thanks
ThemeNectar Support Team
I added the code. Looks OK on Chrome, but it's not rendering properly on FF or Safari. Here's the link I tried it on: http://jquery.in30minutes.com/serialize-un-serialize-form-data/
Hey!
Please see screenshot: http://prntscr.com/5htjsb . Seems to be alright in Firefox , Win 7 .
Thanks
ThemeNectar Support Team