• Resolved richards1052

    (@richards1052)


    For the past few days, I’ve noticed that my sidebar appeared both in the proper place (right) and, whenever I used a Category or Archive view, at the very bottom of the blog display and on the reverse side (left). Last night, I added a bunch of code for sidebar element displays (google adsense, amazon ads, etc.). Now today I notice that the sidebar doesn’t display on the right at all even on the main pg. It’s way down at the bottom on the left.

    I wonder if someone couldn’t do me the favor of taking a look & giving me some ideas of what’s wrong with my sidebar template code (or is it my theme css?).

    http://www.richardsilverstein.com

Viewing 15 replies - 1 through 15 (of 19 total)
  • Check the width of all the content you have added to the sidebar. That is deliniated in this section of your CSS:

    #sidebar {
    float: left;
    padding: 1.8em 20px 0 20px;
    width: 230px;
    font-size: 0.9em;
    voice-family: "\"}\"";
    voice-family: inherit;

    width: 190px;
    }

    Anything you add to the sidebar wider than 230px’s (in some cases 190px’s) will break the format. That may include some of your links that are very long. The biggest offender is the large red colored img. It is way too large and most probably one of the problems.

    BTW I use a variation of , if you would like to compare the two.

    Thread Starter richards1052

    (@richards1052)

    I don’t think that’s the culprit for 2 reasons. First, that image has been in my sidebar for 4 days (when I first launched my wp blog) & displayed perfectly–until today. Second, it’s only 165px wide, so it shouldn’t break anything.

    The FeedBurner img is 200 px. I can remove it fr. the sidebar & see what happens. But when I first added it last night, it was displaying fine so I’m not sure what would’ve changed anything from now till then.

    You said you use “a variation of…” What did you mean?

    Exactly that. I use the same theme but it has been modified from what you have.

    As I mentioned, it also may be some of the longer named links you have in the sidebar, although I still believe its something like an image.

    Try this. Save your sidebar.php template as you have it now (either place it on your server or download it to your home box)

    Then replace it with the original from the theme download.

    If your sidebar display returns to normal there is little doubt it’s something you added to it.

    UPDATE: I was just checking your site again and a light bulb went off because I opened your comment/individual page on the B Walters entry. The side bar displayed correctly.

    Two things, first check that large FireFox image on your main page. It may be the problem.

    Secondly it also may be one of the images you have posted in an entry. Call up each entry currently displayed on your index page as if you were going to comment on it. If one of them displays the sidebar incorrectly and has an image in it you found your problem.

    Thread Starter richards1052

    (@richards1052)

    OK, now we’re getting somewhere. I just checked the posts displayed on the main pg. & there is one that causes the sidebar to vanish, http://www.richardsilverstein.com/tikun_olam/2005/06/yossi-beilin-reconsiders-the-six-day-war/ . But the image in this post is only 226px. I have many other images displaying properly which are larger px sizes.

    The links in this post are:
    http://box22.bluehost.com/~richard2/photos/uncategorized//beilin.jpg
    http://www.israelpalestineforum.com/content/view/35/30/

    These links don’t seem overly long but could the link length be a problem & how do you address this if it is?

    The length of the links shouldn’t create the problem. What may be is the width of the image plus the wigth of your text in the post.

    Here is an example when I had a similar problem. I use images to replace each posts title (with this <a href=”http://www.coldforged.org/archives/2004/11/11/image-replacement-for-entry-titles/
    “>plugin). I posted an article and used a rather long title for it.

    Because the title was wider than the width of the content section as set in the CSS it forced the sidebar to display at the bottom of the page in IE6, the display was normal in Firefox.

    Take that post you linked to and either make the image smaller or delete it and see if the problem clears.

    In IE even the length of the links can create problems 🙁 I always went crazy once because of that, LOL

    Quick suggestion: run the site through the W3C validator, and get it to validate. There are errors all over, and I can’t quickly tell if any might be an underlying cause. If you can clean that up, it eliminates a ton of possible issues.

    -d

    Thread Starter richards1052

    (@richards1052)

    Marc: I guess I’m a little confused about how the image size links to the title length. Besides, the title is: “Yossi Beilin Reconsiders the Six Day War.” That’s not inordinately long. I’m sure I have other posts on my main pg. with longer titles & bigger images.

    I’m not saying you’re wrong (after all you were right in suggesting that one post might be throwing everything out of whack) but I’m scratching my head a little trying to understand the connections bet. things (because I’m new to WP).

    David: I’m sure there would be errors. Carthik & I imported 800 posts from Typepad to WP so there are bound to be inconsistencies & incompatibilities. Hopefully, we’ll get them ironed out soon.

    richards1052
    you have to correct the html of all the posts from Typepad first.
    why?
    if you doesn’t you worked hard to repair your sidebar– I’m sure you’ll find a worcaround—

    then you repair the html of the imported posts and your sidebar would be break again

    the correct way is always
    1.correct (x)html
    2. css

    Thread Starter richards1052

    (@richards1052)

    Marc: You quoted your sidebar css above. I thought I’d display mine here for you to take a look at. I notice that sidebar size isn’t expressed in px but in %:
    .sidebar-categories {
    display: block;
    height: 6.6em;
    overflow: auto;
    background-color: #f4f4f4;
    }
    .sidebar-categories label {
    font-size: 10px;
    display: block;
    width: 90%;
    }

    I don’t know precisely what that tells you. But I thought I’d throw it into the mix in case it rings a bell with anyone.

    The long titles (remember my titles are images) I refered to were my example of the same problem I encountered on my blog.

    Forget I mentioned it if you are confused.

    EDIT: I forgot that you had changed the entire width of your content section. the codes below are from the original theme. Whoever changed your CSS to the wider design has probably also added errors that need correcting. The basic idea below is still valid for your wider version.

    Each section of your blog is set at a certain width. The content and the sidebar together is 750px wide, as seen in this code from your style sheet:
    #wrapper {
    margin: 0 auto;
    width: 750px;
    background-color: #FFF;
    text-align: left;
    }

    Your content section is 520px wide plus some extra, as seen in this bit of code
    #content {
    float: left;
    padding: 0 20px;
    width: 520px;
    voice-family: ""}"";
    voice-family: inherit;
    width: 480px;
    }
    html>body #content {
    width: 480px;
    }

    This is the code for your sidebar:

    #sidebar {
    float: left;
    padding: 1.8em 20px 0 20px;
    width: 230px;
    font-size: 0.9em;
    voice-family: ""}"";
    voice-family: inherit;

    width: 190px;
    }
    html>body #sidebar {
    width: 190px;

    }

    So what you end up with is a sidebar that is 230px wide plus the content width of 520px equals 750px the total width of your display.

    If anything goes over that 750px total width your screwed and your display will shift the sidebar to the bottom of the page. You may feel confused becaused your images arn’t 230px wide or over 520px wide in the content but IT DOES make a difference.

    In addition is the advice davidchait has given you. A page with a lot of validation errors will creat so many problems all other efforts to fix the sidebar may be futile.

    I would be willing to bet, I haven’t looked, that the css you have for floating text around images are part of the problem. Do a search here, there are a few threads that give the correct code for wrapping text.

    Thread Starter richards1052

    (@richards1052)

    Thanks for that mini tutorial. I found some great links through the search you suggested. I’m gonna start with the codex article ( http://codex.wordpress.org/Wrapping_Text_Around_Images ) since it seems simplest & see how that works.

    In Typepad, I did all the formatting for my images & floats in the image display code rather than in css (because I don’t know css well). Here is how I typically float an image right:
    <div><div style="float:right">
    <img style="margin-left: 10px"
    <p style="text-align:center;"><span style="color: blue;"> (credit: )</span></div>

    This code seemed to work fine in TP, but I guess it’s not working with the WP theme and the way we’ve altered it. Do you think if I followed the directions for doing the floating from css rather than in the post that this might help with the problem of the images breaking the sidebar?

    Further, I’ve reviewed more of my posts & you’re indeed exactly right about long titles breaking the sidebar. Is there any way of fixing that problem? Maybe we can narrow the sidebar & widen the text panel a bit? Maybe we can increase the overall size to larger than 750px?

    Another question: when I do install the new css for image floats what happens to the hundreds of images in my existing posts which use the above display code? Would they all get screwed up by conflicting with the css? That may be a stupid ? & if so forgive me because I know not what I do when it comes to css.

    Thread Starter richards1052

    (@richards1052)

    Marc: After reading the codex pg. on css image display I added the following to my theme css file:
    form, img {
    margin: 0;
    padding: 0;
    border: 0; font-size:60%;
    }

    a:hover img {border:solid red 1px }

    p img { padding: 0; max-width: 100%; }

    img.right { padding: 4px; margin: 0 0 2px 7px; display: inline; }

    img.left { padding: 4px; margin: 0 7px 2px 0; display: inline; }

    .right { float: right }

    .left { float: left }

    .caption { margin: 5px;
    padding: 5px;
    width: 45px;
    border: solid 0px #E5E5FF;
    background: #E5F2FF;
    font-size:90%;
    color: blue }
    I can clearly see how much easier this will make uploading an image & creating its display code. But I’m a little less clear on whether this will help with my problem of post titles & images being too wide for the text panel. Will this help w. this problem?

    If the code will help, do I now need to completely rewrite the code I’ve previously used (see above post) to display images before this in order to get whatever benefit I can from the new css display code?

    I just checked my blog after inserting the above code & I’m still breaking the sidebar. I wonder if there’s a way to take a long post title & shorten it somehow using code. Would <Br> tags help? Or something else?

    The length of the title for an image has messed up the position of the sidebar on my blog, but only when the link is broken and the title is displayed in it’s place.

    This does not seem to apply to your situation Richard. The sidebar floats to right after the main content is displayed, assuming there is enough room in the width set in your CSS file. The fact that the sidebar correctly displays in all the permalink pages but the “Yossi Beilin Reconsiders the Six Day War� post indicates the problem is not in your sidebar content, sidebar format, main format, but rather in the content of the offending post. Being that the same CSS works for every other post, I would suggest the path you have been following will not bring resolution. My first action to remedy the error would be to remove the picture and see if the sidebar displays correctly on the refreshed permalink page. If the removal of the image does not work, modification of some other content will. If you are unable to remedy the error for this post, you will need to (a) delete the offending post, (b) modify your theme to allow for larger columns, or (c) wait until this post archives off your main page. If you opt for (c), any archive page including this post will have the same display error.

    Thread Starter richards1052

    (@richards1052)

    I removed the image in question from the post & it no longer breaks the sidebar. Now I know that Marc & Roger were indeed correct in their assumption.

    But the problem I now have is that I have a good number of posts which do this (I don’t know how many precisely since I have nearly 800). I’d hate to have to find & change the images in every single one.

    If I display my posts using div tags with caption–the length of caption would not help cause the sidebar to break would it? I ask because this image has a fairly long caption. Does using p tags or br tags have any positive effect on rectifying this? I assume not.

    Marc, if you’re reading this…you urged me to add code to wrap text around images saying that this might help with images breaking the sidebar. I wonder if you (or anyone reading this) can explain this to me a bit more. First, I don’t understand how or why it’ll do this. Second, I’ve added the code suggested in the codex & for some reason it’s not working. When I insert class=”right” or “left” code for an image nothing happens & the h & vspace coding doesn’t appear to work either.

    I’ve quoted the code I used above but no one’s commented on it to tell me if anything looks obviously wrong with it.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘sidebar appears at bottom of blog display’ is closed to new replies.