Good news, I hope

Ransom said:
The Rogue Tomato said:
Anything is possible, but I don't see how my changes could affect the "new" button.

Do your changes cause the page to reflow itself after loading? Possibly that's what's happening - the page loads, showing the "proper" location, then reflows itself narrower, pushing the newer posts down.

Yeah, it might, if there are images or long URLs on that page. 

That's also going to depend on the order in which your browser renders things.  That was the problem with Firefox that I had to overcome.  It rendered the image first, and then the surrounding DIV, which short-circuited my first attempt to resize the image. 

My solution was to resize the image based on the entire browser window width (not counting scroll bar).
 
The Rogue Tomato said:
That's also going to depend on the order in which your browser renders things.  That was the problem with Firefox that I had to overcome.  It rendered the image first, and then the surrounding DIV, which short-circuited my first attempt to resize the image.

Based on your past experiences, I figured it must be a Firefox thing. Probably not worth quibbling over, anyway.

Ironically, this thread is still wider than the browser window, whereas I don't think I've seen any other thread like that recently. Something to do with the not-very-frequently-used code tags, I'd guess?
 
Ransom said:
The Rogue Tomato said:
That's also going to depend on the order in which your browser renders things.  That was the problem with Firefox that I had to overcome.  It rendered the image first, and then the surrounding DIV, which short-circuited my first attempt to resize the image.

Based on your past experiences, I figured it must be a Firefox thing. Probably not worth quibbling over, anyway.

Ironically, this thread is still wider than the browser window, whereas I don't think I've seen any other thread like that recently. Something to do with the not-very-frequently-used code tags, I'd guess?

I don't think so.  This page looks fine on Firefox on my system.  I turned off adblock in case that was your problem, but the page still looks fine in Firefox for me without adblock (running in Linux -- I haven't tried Windows Firefox without adblock yet). 

However, I'm only viewing the default number of posts per page.  If you are viewing enough posts per page that it's also including the code blocks above, that could be your problem.  They're set at max-width of 800px, I think, and that's big enough to push the ads off the page at my current browser width.  Maybe admin should change the index.css file to make code blocks smaller.  I can't do it now - don't have the password. 

Unlike pictures, there's no reason to have code blocks at 800px.  Nobody's going to actually read the code on a forum like this, so forcing the code blocks to be 600px or less and make people scroll would be fine, I think. 

Here's the spot to change in Themes/default/css/index.css, admin:

code.bbc_code
{
  max-width: 800px;  // <<--- change to 500px or 600px or something
  display: block;
  font-family: "dejavu sans mono", "monaco", "lucida console", "courier new", monospace;
  font-size: x-small;
  background: #eef;
  border-top: 2px solid #999;
  border-bottom: 2px solid #999;
  line-height: 1.5em;
  padding: 3px 1em;
  overflow: auto;
  white-space: nowrap;
  /* Show a scrollbar after about 24 lines. */
  max-height: 24em;
}
 
The Rogue Tomato said:
If you are viewing enough posts per page that it's also including the code blocks above, that could be your problem.

I am running with the maximum number of posts per page. I don't like paging - any more than I like side-scrolling. :)
 
Ransom said:
The Rogue Tomato said:
If you are viewing enough posts per page that it's also including the code blocks above, that could be your problem.

I am running with the maximum number of posts per page. I don't like paging - any more than I like side-scrolling. :)

That explains it, then.  If admin makes the changes above, that would cure it for this thread.  It wouldn't cure it for threads with pictures or long URLs, though.  And I don't think we should make the pictures any smaller than 800px unless the admin wants to do that so I don't get blamed. ;) 

You could also make your browser window wider... ;)

EDIT: Another alternative is if the admin lets me back in, I could modify the Javascript to make code blocks scale with the size of the window.  It would be easier to just shrink them in CSS as I described, though.  This is not a programming forum, so shrinking them in CSS seems to be the most logical approach, and the admin can do that himself.
 
Ransom, let me know if my changes fixed this thread for you.

Admin, I took the opportunity to do a lot of clean-up.  I got rid of the createCSSSelector routine in theme.js, since jQuery does a better job at that function.  I also restored the class names to their original names (bbc_shourtlink goes back to bbc_link, bbcimg goes back to bbc_img).  And I got rid of the new IDs that I ended up not using, like "parentpost". 

I also shortened the max-width for URLs by 100px, since they were pushing the ads halfway off the screen.
 
admin said:
Thanks for your hard work!

My pleasure.  If everyone is happy, you can change the password again. 

Here is the updated code that does all the work (I updated it in the code block above, too).

Code:
<script type="text/javascript">
$( document ).ready( function(){
    set_initial_widths();
    setMaxWidth();
    $( window ).bind( "resize", setMaxWidth );

    function setMaxWidth() {
        var wwidth = $( window ).width() - 600;
        var cssObj = { "max-width" : wwidth "px", "height" : "auto", "width" : "auto" }
        if (!is_chrome && !is_webkit && !is_safari && !isSafari)
        {
            $( ".bbc_img" ).css(cssObj);
        }
        var lwidth = wwidth - 100;
        var cssObjLink = { "max-width" : lwidth "px", "display" : "inline-block", "text-overflow" : "ellipsis", "overflow" : "hidden", "white-space" : "nowrap" }
        $( ".bbc_link" ).css(cssObjLink);
        var cssObjCode = { "max-width" : wwidth "px", "display" : "block", "font-family" : "dejavu sans mono, monaco, lucida console, courier new, monospace", "font-size" : "x-small", "background" : "#eef", "border-top" : "2px solid #999", "border-bottom" : "2px solid #999", "line-height" : "1.5em", "padding" : "3px 1em", "overflow" : "auto",  "white-space" : "nowrap", "max-height" : "24em" } 
        $( ".bbc_code" ).css(cssObjCode);
    }

    function set_initial_widths()
    {  
      if (is_chrome || is_webkit || is_safari || isSafari)
      {
        var cssObjInit = { "max-width" : "100%", "height" : "auto", "width" : "auto" }
        $( ".bbc_img" ).css(cssObjInit);
      }
      else
      {
        var wwidth = $( window ).width() - 600;
        var cssObjInit = { "max-width" : wwidth "px", "height" : "auto", "width" : "auto" }
        $( ".bbc_img" ).css(cssObjInit);
      }
    }
});
</script>
 
The Rogue Tomato said:
Ransom, let me know if my changes fixed this thread for you.

Thanks! I'm at the office, but I'll check it out when I get home (on the same equipment).
 
Back
Top