Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Site Bugs / Suggestions
  4. <PRE> Tag Too Wide On Firefox

<PRE> Tag Too Wide On Firefox

Scheduled Pinned Locked Moved Site Bugs / Suggestions
helpcsharphtmlcsswpf
10 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Curtis Schlak
    wrote on last edited by
    #1

    I've hung around CP for a couple of years, now, lurking in the silent shadows of anonymity. Recently, though, I've started contributing back to the community since I've recently written Win32/.NET applications and feel comfortable with the accurary and precision of my answers. In my answers and article (with more articles to come; I want that platinum status, folks!), I've found an irritant that causes me to cringe everytime I see it: PRE tags that extend beyond the border of the message/article. Of course, it does not do that in MSIE. I accept that. Since I exclusively use FF to view CP, though, I see it on almost every page. The problem occurs because of the higlighted line in the following snippet from the CSS file /styles/global.css:

    PRE
    {
    background-color: #FBEDBB;
    padding: 7pt;
    background-image: url(/images/codebg.gif);
    font: 9pt "Courier New", Courier, mono;
    white-space: pre;
    width: 100%;
    /*overflow: auto;*/
    }

    If that width: 100%; gets removed from the global.css file, then the PRE tags behave the same on both MSIE 5.5/6.0 and FF 0.X/1.X. This behaves as it should, with the PRE tag's block display extending to the boundaries of its parent HTML block display element. [I don't know about other broswers because I don't have them installed. Sorry. If I did, I'd test them for you.] If anyone does not have any objections, can we remove that width: 100%; from the CSS file? And, if there's anything I can do to help with this change (or no change, as that's okay, too), please, do not hesitate to ask. Sorry about the complaint. Just thought I'd ask. Never hurts, right? "we must lose precision to make significant statements about complex systems." -deKorvin on uncertainty

    S J 2 Replies Last reply
    0
    • C Curtis Schlak

      I've hung around CP for a couple of years, now, lurking in the silent shadows of anonymity. Recently, though, I've started contributing back to the community since I've recently written Win32/.NET applications and feel comfortable with the accurary and precision of my answers. In my answers and article (with more articles to come; I want that platinum status, folks!), I've found an irritant that causes me to cringe everytime I see it: PRE tags that extend beyond the border of the message/article. Of course, it does not do that in MSIE. I accept that. Since I exclusively use FF to view CP, though, I see it on almost every page. The problem occurs because of the higlighted line in the following snippet from the CSS file /styles/global.css:

      PRE
      {
      background-color: #FBEDBB;
      padding: 7pt;
      background-image: url(/images/codebg.gif);
      font: 9pt "Courier New", Courier, mono;
      white-space: pre;
      width: 100%;
      /*overflow: auto;*/
      }

      If that width: 100%; gets removed from the global.css file, then the PRE tags behave the same on both MSIE 5.5/6.0 and FF 0.X/1.X. This behaves as it should, with the PRE tag's block display extending to the boundaries of its parent HTML block display element. [I don't know about other broswers because I don't have them installed. Sorry. If I did, I'd test them for you.] If anyone does not have any objections, can we remove that width: 100%; from the CSS file? And, if there's anything I can do to help with this change (or no change, as that's okay, too), please, do not hesitate to ask. Sorry about the complaint. Just thought I'd ask. Never hurts, right? "we must lose precision to make significant statements about complex systems." -deKorvin on uncertainty

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      Better yet, if both width and overflow are set to automatic:

      width: auto;
      overflow: auto;

      then extra-long lines in pre blocks no longer increase the width of the entire page...

      ---- Scripts i've known... CPhog 0.9.9 - make CP better. Forum Bookmark 0.2.1 - bookmark forum posts on Pensieve Print forum 0.1.1 - printer-friendly forums

      1 Reply Last reply
      0
      • C Curtis Schlak

        I've hung around CP for a couple of years, now, lurking in the silent shadows of anonymity. Recently, though, I've started contributing back to the community since I've recently written Win32/.NET applications and feel comfortable with the accurary and precision of my answers. In my answers and article (with more articles to come; I want that platinum status, folks!), I've found an irritant that causes me to cringe everytime I see it: PRE tags that extend beyond the border of the message/article. Of course, it does not do that in MSIE. I accept that. Since I exclusively use FF to view CP, though, I see it on almost every page. The problem occurs because of the higlighted line in the following snippet from the CSS file /styles/global.css:

        PRE
        {
        background-color: #FBEDBB;
        padding: 7pt;
        background-image: url(/images/codebg.gif);
        font: 9pt "Courier New", Courier, mono;
        white-space: pre;
        width: 100%;
        /*overflow: auto;*/
        }

        If that width: 100%; gets removed from the global.css file, then the PRE tags behave the same on both MSIE 5.5/6.0 and FF 0.X/1.X. This behaves as it should, with the PRE tag's block display extending to the boundaries of its parent HTML block display element. [I don't know about other broswers because I don't have them installed. Sorry. If I did, I'd test them for you.] If anyone does not have any objections, can we remove that width: 100%; from the CSS file? And, if there's anything I can do to help with this change (or no change, as that's okay, too), please, do not hesitate to ask. Sorry about the complaint. Just thought I'd ask. Never hurts, right? "we must lose precision to make significant statements about complex systems." -deKorvin on uncertainty

        J Offline
        J Offline
        J Dunlap
        wrote on last edited by
        #3

        ...if you're using GreaseMonkey+CPHog - stick this in your CPHog user script:

        for(var i=0;i<document.styleSheets.length;i++)
        {
        if(document.styleSheets[i].href.toLowerCase().indexOf("styles/global.css")!=-1)
        {
        var styleSheet=document.styleSheets[i];
        for(var j=0;j<styleSheet.cssRules.length;j++)
        {
        if(styleSheet.cssRules[j].selectorText=="pre")
        {
        styleSheet.cssRules[j].style.width="auto";
        styleSheet.cssRules[j].style.overflow="auto";
        break;
        }
        }
        break;
        }
        }

        J 1 Reply Last reply
        0
        • J J Dunlap

          ...if you're using GreaseMonkey+CPHog - stick this in your CPHog user script:

          for(var i=0;i<document.styleSheets.length;i++)
          {
          if(document.styleSheets[i].href.toLowerCase().indexOf("styles/global.css")!=-1)
          {
          var styleSheet=document.styleSheets[i];
          for(var j=0;j<styleSheet.cssRules.length;j++)
          {
          if(styleSheet.cssRules[j].selectorText=="pre")
          {
          styleSheet.cssRules[j].style.width="auto";
          styleSheet.cssRules[j].style.overflow="auto";
          break;
          }
          }
          break;
          }
          }

          J Offline
          J Offline
          J Dunlap
          wrote on last edited by
          #4

          aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

          Hmm... it seems that overflow:auto doesn't work when a post starts out expanded at page load - I guess the layout isn't re-calculated correctly when the script changes the overflow property. I think I recall having this problem before with a lookup control I did - I will have to see what I did there to fix it.

          S 1 Reply Last reply
          0
          • J J Dunlap

            aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

            Hmm... it seems that overflow:auto doesn't work when a post starts out expanded at page load - I guess the layout isn't re-calculated correctly when the script changes the overflow property. I think I recall having this problem before with a lookup control I did - I will have to see what I did there to fix it.

            S Offline
            S Offline
            Shog9 0
            wrote on last edited by
            #5

            Looks like Chris has both changes in the main stylesheet now. :) BTW - Firefox has (as of 1.5) a fairly simple means of adding site-specific CSS rules to your userContent.css file. See here for more info: http://simon.incutio.com/archive/2004/08/19/specific[^]

            ---- Scripts i've known... CPhog 0.9.9 - make CP better. Forum Bookmark 0.2.1 - bookmark forum posts on Pensieve Print forum 0.1.1 - printer-friendly forums

            J C 3 Replies Last reply
            0
            • S Shog9 0

              Looks like Chris has both changes in the main stylesheet now. :) BTW - Firefox has (as of 1.5) a fairly simple means of adding site-specific CSS rules to your userContent.css file. See here for more info: http://simon.incutio.com/archive/2004/08/19/specific[^]

              ---- Scripts i've known... CPhog 0.9.9 - make CP better. Forum Bookmark 0.2.1 - bookmark forum posts on Pensieve Print forum 0.1.1 - printer-friendly forums

              J Offline
              J Offline
              J Dunlap
              wrote on last edited by
              #6

              Shog9 wrote:

              Looks like Chris has both changes in the main stylesheet now.

              Awesome! :cool:

              Shog9 wrote:

              BTW - Firefox has (as of 1.5) a fairly simple means of adding site-specific CSS rules to your userContent.css file

              I'd heard about it but was not aware that you could override existing style attributes with it (although thinking about it, I ought to have known you could do it via the "!important" specifier). Thanks for the info!

              1 Reply Last reply
              0
              • S Shog9 0

                Looks like Chris has both changes in the main stylesheet now. :) BTW - Firefox has (as of 1.5) a fairly simple means of adding site-specific CSS rules to your userContent.css file. See here for more info: http://simon.incutio.com/archive/2004/08/19/specific[^]

                ---- Scripts i've known... CPhog 0.9.9 - make CP better. Forum Bookmark 0.2.1 - bookmark forum posts on Pensieve Print forum 0.1.1 - printer-friendly forums

                C Offline
                C Offline
                Curtis Schlak
                wrote on last edited by
                #7

                Shog, Thanks for the pointer. I don't mind doing that on my machine; however, I just wanted everyone who shows up here to dig the articles and postings without hassle. I want everyone* to use CP! * Everyone that needs it, I mean. I don't think that my six-year old son needs it. YET! "we must lose precision to make significant statements about complex systems." -deKorvin on uncertainty

                S 1 Reply Last reply
                0
                • S Shog9 0

                  Looks like Chris has both changes in the main stylesheet now. :) BTW - Firefox has (as of 1.5) a fairly simple means of adding site-specific CSS rules to your userContent.css file. See here for more info: http://simon.incutio.com/archive/2004/08/19/specific[^]

                  ---- Scripts i've known... CPhog 0.9.9 - make CP better. Forum Bookmark 0.2.1 - bookmark forum posts on Pensieve Print forum 0.1.1 - printer-friendly forums

                  C Offline
                  C Offline
                  Curtis Schlak
                  wrote on last edited by
                  #8

                  To practice my colloquialisms: A BIG SHOUT OUT TO CHRIS FOR THE CHANGE! LOOKS GREAT! "we must lose precision to make significant statements about complex systems." -deKorvin on uncertainty

                  1 Reply Last reply
                  0
                  • C Curtis Schlak

                    Shog, Thanks for the pointer. I don't mind doing that on my machine; however, I just wanted everyone who shows up here to dig the articles and postings without hassle. I want everyone* to use CP! * Everyone that needs it, I mean. I don't think that my six-year old son needs it. YET! "we must lose precision to make significant statements about complex systems." -deKorvin on uncertainty

                    S Offline
                    S Offline
                    Shog9 0
                    wrote on last edited by
                    #9

                    Curtis S. wrote:

                    I just wanted everyone who shows up here to dig the articles and postings without hassle.

                    And we appreciate it. :) I only mentioned the means of doing it locally because i figured there are others like me who, while happy to make suggestions, also don't like to actually wait for them to be implemented... ;)

                    ---- Scripts i've known... CPhog 0.9.9 - make CP better. Forum Bookmark 0.2.1 - bookmark forum posts on Pensieve Print forum 0.1.1 - printer-friendly forums

                    C 1 Reply Last reply
                    0
                    • S Shog9 0

                      Curtis S. wrote:

                      I just wanted everyone who shows up here to dig the articles and postings without hassle.

                      And we appreciate it. :) I only mentioned the means of doing it locally because i figured there are others like me who, while happy to make suggestions, also don't like to actually wait for them to be implemented... ;)

                      ---- Scripts i've known... CPhog 0.9.9 - make CP better. Forum Bookmark 0.2.1 - bookmark forum posts on Pensieve Print forum 0.1.1 - printer-friendly forums

                      C Offline
                      C Offline
                      Curtis Schlak
                      wrote on last edited by
                      #10

                      <smile>I don't know who you are, but I like your style.</smile> "we must lose precision to make significant statements about complex systems." -deKorvin on uncertainty

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups