<PRE> Tag Too Wide On Firefox
-
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 thatwidth: 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 -
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 thatwidth: 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 uncertaintyBetter 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
-
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 thatwidth: 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...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;
}
} -
...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;
}
}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 theoverflow
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. -
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 theoverflow
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.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
-
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
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!
-
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
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
-
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
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
-
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
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
-
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
<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