12 Replies Latest reply on Jun 28, 2004 11:06 AM by jae77

    Text is cut off at far right end

    sysuser1

      I'm having a problem with the imagic theme. Text is cut off at the far right when I view the Forum module. Why is that?

      Regards,
      /Henrik

        • 1. Re: Text is cut off at far right end
          jae77

          are you using ie?

          most likely, this has to do w/ poor html coding (we're all a bunch of programmers here, not html experts). if you are using ie, it has problems rendering some of the pages correctly (i'm not sure if it's the html or ie).

          feel free to track down the issue and submit a patch to correct it.

          • 2. Re: Text is cut off at far right end
            hxp


            Also see

            "Forums should enforce width constraint on wide posts"

            http://www.jboss.org/index.html?module=bb&op=viewtopic&t=49308

            The problem you mention is somewhat different, since it comes from a specific Nukes theme having a fixed pixel width for an html table column.

            But it would be good for a new volunteer to come in and fix both problems, and enforcing width constraints on wide posts would be a first step towards fixing both problems.




            • 3. Re: Text is cut off at far right end
              jnmdev

               

              "henrikandoff" wrote:
              I'm having a problem with the imagic theme. Text is cut off at the far right when I view the Forum module. Why is that?

              Regards,
              /Henrik


              Hi,

              I commented out the following div-tags to make it work:
              <!--div style="margin: 1em 3em"--><!-- END header --><!-- BEGIN footer --><!--/div-->

              They are located in:
              \nukes-snapshot\nukes\src\bin\nukes-lib-jar\org\jboss\nukes\core\themes\imagic\theme.html

              I needed to "build deploy" and restart the server also... This won't fix wide images etc. But it seems to fix most issues.

              Cheers,
              jnmdev

              • 4. Re: Text is cut off at far right end
                jae77

                you can't comment out the the following:

                 <!-- END header -->
                 <!-- BEGIN footer -->
                


                b/c that is how the templating engine knows how to start processing loops and/or display additional text depending upon some criteria (ie: is the user logged in).

                i'm surprised you didn't get a deployment exception b/c the rendering engine usually picks this up as a missing tag and "complains" when the templats are compiled.


                • 5. Re: Text is cut off at far right end
                  jnmdev

                  Correct,

                  and I didn't. I commented out both the start tag, and the end tag. But of course, you could remove them instead.

                  The middle part was never commented out.

                  Cheers,
                  jnmdev

                  • 6. Re: Text is cut off at far right end
                    jnmdev

                     

                    "jnmdev" wrote:
                    Correct,

                    and I didn't. I commented out both the <div> start tag, and the </div> end tag. But of course, you could remove them instead.

                    The middle part was never commented out.

                    Cheers,
                    jnmdev


                    Oops, the HTML got lost in my last post. What I wanted to say was that each of the DIV-tags were commented out. But you could remove them instead.

                    The "END header" and "BEGIN footer" were left untouched.

                    Cheers,
                    jnmdev

                    • 7. Re: Text is cut off at far right end
                      aalmero

                      just play around with the right param for style and not removing the div coz it will not look nice with other borwsers.

                      <div style="margin: 1em 3em">


                      • 8. Re: Text is cut off at far right end
                        lonicera

                        Did anyone solve completely this issue?

                        • 9. Re: Text is cut off at far right end
                          jae77

                          i believe julien fixed the "scrolling to the right" problem, but the rendering issue in IE still exists. anyone w/ html skills is more then welcome to submit patches.

                          • 10. Re: Text is cut off at far right end

                             

                            "jae77" wrote:
                            i believe julien fixed the "scrolling to the right" problem, but the rendering issue in IE still exists. anyone w/ html skills is more then welcome to submit patches.


                            I'm no HTML expert, but i've been telling my designers to fix stuff like this for long enough so i know what causes it. IE is a bit buggy when it comes to mixing CSS and plain HTML. The problem is here is caused by having a table in the in forums with width="100%" inside of a div tag with a margin. The imagic them pads the inner block with a margin, but when IE calculates 100%, it doesn't think about the margin. Thus the problem. So is it the module's responsibility to worry about stuff like this, or the theme's problem? Using the imagic theme and my own module with a 100% wide table causes the same issue.

                            Thus said, there are two ways to fix it - take the div margin padding off of the theme (or switch it to an empty column for padding), or change the width of the tables in the BB module. Personally, I switched the BB module to have width="98%" for all of its tables, and then reduced the margin to 2px or so (more accurate across platforms than using "em"). I don't know who owns the mod or the theme, but i could send updated files if anyone wants to check them in.

                            On another note, anyone interested in a pure CSS theme? Would be much better for rendering time, accessibility, and file size than the tables we're using for layout. I'm thinking of designing one, wondered if anyone would be interested when i'm done.

                            ... .joe



                            • 11. Re: Text is cut off at far right end
                              jae77

                              send me the files to jgangemi@yahoo.com and i'll check them in.

                              the pure CSS theme sounds pretty cool, definate interest here.

                              • 12. Re: Text is cut off at far right end
                                jae77

                                looks good joe, thx! ie was cutting off the top portion of the text if you weren't logged in, but i solved that by adding a br tag. :)

                                this has been checked in and is tagged against RC1.