We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18646
    • 106 Posts
    This is really annoying, I’ve defined a chunk that has the following code:

    <div class="float_left">
    <img src="assets/templates/rogosin/images/right_tab.gif" height="34" width="22">
    </div>


    the line break after the image in this code adds gaps in IE6 (grrr): http://s221107525.onlinehome.us/rogosin/index.php?id=75
    If i take out the gaps in the code, IE behaves:

    <div class="float_left"><img src="assets/templates/rogosin/images/right_tab.gif" height="34" width="22"></div>


    Problem is, when the client goes back in to edit these side boxes and uses the tinymce, it re-rags the code and adds formatting again (the line breaks). So the boxes break again in IE6.
    Short of recoding this, is there either a CSS property I can use to avoid this, or a setting i can turn on that keeps tinymce from reformatting the HTML?

    Regards,
    Matt

      • 3749
      • 24,544 Posts
      If you turn off rich text editing in TinyMCE (uncheck the "Rich Text" box on the Page Settings tab), it will stop doing that.

      Bob
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 27708 MODX Staff
        • 2,502 Posts
        It looks to me like it is not whitespace but that either the MODx or Tiny are adding
        elements after linebreaks in the source. I think that Tiny by default will treat a double line break as a paragraph and a single as a
        but I am fairly sure that there is a way to change that. I am inclined to think that it is MODx doing it and not Tiny as Tiny is set by default not to do that.
          Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
          • 18646
          • 106 Posts
          I’ve already tried something like this code:

          img {
          white-space: nowrap;
          display: inline;
          margin:0;
          padding:0;
          }


          It didn’t work. Also to the second point; I can’t turn off Rich text editing because this right hand column is a chunk. Not only that, I need to give the clients the ability to change the barkers using the visual editor.

          Regards,
          Matt
            • 18646
            • 106 Posts
            problem solved. It was actually much easier then any of that. I just recoded the html to use the CSS style border: double; instead of stacking images on the top and bottom of the box.

            Thanks all, as always great community support!

            Regards,
            Matt