0
Welcome Guest! Login
0 items Join Now

SOLVED Line break <br /> not working in heading ( h tag )

    • 1221's Avatar
    • 1221
    • Sr. Rocketeer
    • Posts: 181
    • Thanks: 0

    SOLVED Line break <br /> not working in heading ( h tag )

    Posted 13 years 1 month ago
    • I have look everywhere to find a solution for this problem and have found nothing.

      Whenever I try to force a line break inside an h tag (in a module) it doesn't work

      EXAMPLE: <h1>Force Line Break<br /> Not Working</h1>
      OUTPUT: Force Line BreakNot Working

      generated source code does not contain the break ( <br /> )

      Any Suggestions??

      Joomla 2.5.4
    • Last Edit: 13 years 1 month ago by 1221.
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: SOLVED Line break <br /> not working in heading ( h tag )

    Posted 13 years 1 month ago
    • What editor are you using? It could be stripping out your HTML tags if it doesn't like what it sees. Try disabling all content filtering and / or try using a code editor.
    • The difficult we do immediately, the impossible takes a little longer.
    • 1221's Avatar
    • 1221
    • Sr. Rocketeer
    • Posts: 181
    • Thanks: 0

    Re: SOLVED Line break <br /> not working in heading ( h tag )

    Posted 13 years 1 month ago
    • I am using JCE. But I've also tested with the editor turned off.
      The code with the editor turned off shows the break as does the source code if you view the browser's source view (not using Firebug or other web developer tools).

      Someone in the JCE forum said that this suggests that the change is being made by javascript after the page has loaded. They also said that it looks like one of the template scripts is responsible :
      window.addEvent('domready', function() {
       
          var modules = ['rt-block'];
       
          var header = ['h3','h2','h1'];
       
          GantryBuildSpans(modules, header);
       
      });



      Here is a link http://173.205.125.70/~gopinkwi/

      The text below the logo should break after Athletes

      <h1 style="text-align: center;">Athletes<br />Helping Women Kick Breast Cancer.</h1>

      Athletes
      Helping
      Women Kick
      Breast Cancer

      This issue happens to me quite frequently with different templates. It seems like any time I have text in a module and use an h tag, the line breaks never work
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: SOLVED Line break <br /> not working in heading ( h tag )

    Posted 13 years 1 month ago
    • Hi, try turning off "build title spans" in the template settings.
    • The difficult we do immediately, the impossible takes a little longer.
    • 1221's Avatar
    • 1221
    • Sr. Rocketeer
    • Posts: 181
    • Thanks: 0

    Re: SOLVED Line break <br /> not working in heading ( h tag )

    Posted 13 years 1 month ago
    • That did it!

      Are there any adjustments I can make to be able to use the title spans?
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: SOLVED Line break <br /> not working in heading ( h tag )

    Posted 13 years 1 month ago
    • you could exclude the h1-tags from being affected by "build titlle spans" by removing it from jstools.php feature.

      To do that copy that file from the gantry core-features folder in to the features-folder of the template and remove the h1-tag from
      var header = ;
    • 1221's Avatar
    • 1221
    • Sr. Rocketeer
    • Posts: 181
    • Thanks: 0

    Re: SOLVED Line break <br /> not working in heading ( h tag )

    Posted 13 years 1 month ago
    • Thanks Henning, I'll give that a try.
      And thank you Cliff for helping me figure this out! You guys are awesome!

Time to create page: 0.050 seconds