• I’m trying to use the <h2> tag like this:

    <h2>Cost – </h2> $1 for 12 units

    This should all appear in one line. But the display ends up like this:
    Cost –
    $1 for 12 units

    I have tried the following:

    1. Edited and removed h[1-6] and hgroup from the following:

    "$allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|noscript|legend|section|article|aside|hgroup|header|footer|nav|figure|details|menu|summary)';"

    2. Added display: inline; in the following:

    h2 {
    	font-size: 14px;
    	font-size: 1.4rem;
    	}

    But nothing is working, can anyone suggest a solution?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Shyamraj,

    can you please share a link to your site?

    Thanks

    Thread Starter shyamraj

    (@shyamraj)

    Hi Maruti,

    I think a link won’t help here. Its about the <h> tags.

    And this problem has been reported many times across wordpress forums. I did find a solution that states to remove/disable “wpautop” function and manually applying the formatting.

    I’m not a wordpress person and would rather refrain from doing this, and wait for some better alternative.

    It would still be helpful if you posted a link to your site, so we can see exactly what your HTML structure is and see if there are any other CSS rules being applied. Sometimes a second pair of eyes can help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to remove line breaks from tags?’ is closed to new replies.