Support » Themes and Templates » Wrong background colour in HTML text

  • Resolved viotto

    (@viotto)



    Hi,
    I would like to use the http://hilite.me/ code hilighter on my WordPress website, since it is my preferred code hilighter and worked great on my previous site. I tried a few code highliter plugins for WordPress but still I would prefer to use this service, which simply generates formatted hmtl of the code, and has got plenty of options regarding code language and style.

    This is the code generated in hilite.me, which shows correct background (black):
    How it should look

    I pasted the html code from hilite.me to a raw html widget in wordpress, and this is screenshot of the result :
    Wrong background

    The background colour is wrong, it should be same background of rest of site (dark grey), instead is yellow.
    I checked theme options and seems not related to those.
    I post here HTML code generated from hilite.me, maybe there is something I need to edit? It worked well on my previous site, it wasn’t built with WordPress though.

    Thanks in advance for helping me out!

    <!-- HTML generated using hilite.me --><div style="background: #202020; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><table><tr><td><pre style="margin: 0; line-height: 125%"> 1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34</pre></td><td><pre style="margin: 0; line-height: 125%"><span style="color: #999999; font-style: italic">/*****************************************************************************\</span>
    <span style="color: #999999; font-style: italic">*</span>
    <span style="color: #999999; font-style: italic">*  CryptoGear Encryption Algorithm</span>
    <span style="color: #999999; font-style: italic">*</span>
    <span style="color: #999999; font-style: italic">******************************************************************************/</span>
    
    <span style="color: #999999; font-style: italic">// Cipher Modes of operation:</span>
    <span style="color: #cd2828; font-weight: bold">#define MODE_ECB 0  </span><span style="color: #999999; font-style: italic">// Electronic Codebook</span>
    <span style="color: #cd2828; font-weight: bold">#define MODE_CBC 1  </span><span style="color: #999999; font-style: italic">// Cipher Block Chaining</span>
    
    <span style="color: #6ab825; font-weight: bold">class</span> <span style="color: #447fcf; text-decoration: underline">CCryptoGear</span>
    <span style="color: #d0d0d0">{</span>
    <span style="color: #d0d0d0">private:</span>
    	<span style="color: #6ab825; font-weight: bold">static</span> <span style="color: #6ab825; font-weight: bold">const</span> <span style="color: #6ab825; font-weight: bold">unsigned</span> <span style="color: #6ab825; font-weight: bold">char</span> <span style="color: #d0d0d0">m_InitializationVector</span> <span style="color: #d0d0d0">=</span> <span style="color: #3677a9">0</span><span style="color: #d0d0d0">;</span> <span style="color: #999999; font-style: italic">// 0-255</span>
    	<span style="color: #6ab825; font-weight: bold">static</span> <span style="color: #6ab825; font-weight: bold">const</span> <span style="color: #6ab825; font-weight: bold">unsigned</span> <span style="color: #6ab825; font-weight: bold">short</span> <span style="color: #d0d0d0">m_lenKeystream</span> <span style="color: #d0d0d0">=</span> <span style="color: #3677a9">256</span><span style="color: #d0d0d0">;</span>
    	<span style="color: #6ab825; font-weight: bold">unsigned</span> <span style="color: #6ab825; font-weight: bold">char</span> <span style="color: #d0d0d0">m_ModeOfOperation;</span>
    	<span style="color: #6ab825; font-weight: bold">unsigned</span> <span style="color: #6ab825; font-weight: bold">char</span> <span style="color: #d0d0d0">m_KeyStream[m_lenKeystream];</span>
    
    <span style="color: #d0d0d0">public:</span>
    	<span style="color: #d0d0d0">CCryptoGear(</span><span style="color: #6ab825; font-weight: bold">unsigned</span> <span style="color: #6ab825; font-weight: bold">char</span><span style="color: #d0d0d0">*</span> <span style="color: #d0d0d0">pKey,</span> 
    		<span style="color: #6ab825; font-weight: bold">unsigned</span> <span style="color: #6ab825; font-weight: bold">int</span> <span style="color: #d0d0d0">lenKey,</span> 
    		<span style="color: #6ab825; font-weight: bold">unsigned</span> <span style="color: #6ab825; font-weight: bold">char</span> <span style="color: #d0d0d0">ModeOfOperation</span> <span style="color: #d0d0d0">=</span> <span style="color: #d0d0d0">MODE_CBC,</span>
    		<span style="color: #6ab825; font-weight: bold">unsigned</span> <span style="color: #6ab825; font-weight: bold">char</span> <span style="color: #d0d0d0">InitializationVector</span> <span style="color: #d0d0d0">=</span> <span style="color: #d0d0d0">m_InitializationVector);</span>
    
    	<span style="color: #d0d0d0">CCryptoGear();</span>
    
    	<span style="color: #6ab825; font-weight: bold">void</span> <span style="color: #447fcf">Initialize</span><span style="color: #d0d0d0">(</span><span style="color: #6ab825; font-weight: bold">unsigned</span> <span style="color: #6ab825; font-weight: bold">char</span><span style="color: #d0d0d0">*</span> <span style="color: #d0d0d0">pKey,</span> <span style="color: #6ab825; font-weight: bold">unsigned</span> <span style="color: #6ab825; font-weight: bold">int</span> <span style="color: #d0d0d0">lenKey,</span> 
    		<span style="color: #6ab825; font-weight: bold">unsigned</span> <span style="color: #6ab825; font-weight: bold">char</span> <span style="color: #d0d0d0">ModeOfOperation</span> <span style="color: #d0d0d0">=</span> <span style="color: #d0d0d0">MODE_CBC,</span>
    		<span style="color: #6ab825; font-weight: bold">unsigned</span> <span style="color: #6ab825; font-weight: bold">char</span> <span style="color: #d0d0d0">InitializationVector</span> <span style="color: #d0d0d0">=</span> <span style="color: #d0d0d0">m_InitializationVector);</span>
    
    	<span style="color: #6ab825; font-weight: bold">void</span> <span style="color: #447fcf">Encrypt</span><span style="color: #d0d0d0">(</span><span style="color: #6ab825; font-weight: bold">unsigned</span> <span style="color: #6ab825; font-weight: bold">char</span> <span style="color: #d0d0d0">pData[],</span> <span style="color: #6ab825; font-weight: bold">unsigned</span> <span style="color: #6ab825; font-weight: bold">long</span> <span style="color: #d0d0d0">lenData);</span>
    	<span style="color: #6ab825; font-weight: bold">void</span> <span style="color: #447fcf">Decrypt</span><span style="color: #d0d0d0">(</span><span style="color: #6ab825; font-weight: bold">unsigned</span> <span style="color: #6ab825; font-weight: bold">char</span> <span style="color: #d0d0d0">pData[],</span> <span style="color: #6ab825; font-weight: bold">unsigned</span> <span style="color: #6ab825; font-weight: bold">long</span> <span style="color: #d0d0d0">lenData);</span>
    <span style="color: #d0d0d0">};</span>
    </pre></td></tr></table></div>
    
    • This topic was modified 1 year, 10 months ago by  viotto.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Wrong background colour in HTML text’ is closed to new replies.