Forums

[resolved] Sidebar pushed down (Not a index/post problem). (12 posts)

  1. cheart
    Member
    Posted 2 years ago #

    When I add my getsidebar into my .PHP file, it pushes sections down. So say if I put the getsidebar include right below my getheader, it'll push my content down past the sidebar. And if I put the include code AFTER my div="content" coding, it pushes the sidebar PAST my content.

    Here's a link:
    http://www.chelseasheart.com/site/info.php

    And here's the link to the coding in my info.php file.
    http://www.chelseasheart.com/site/infocode.php

    I'm really new to WordPress, and have gotten myself this far on my own, yet this seems to be far beyond my understanding.

    Thanks.

  2. Samuel B
    moderator
    Posted 2 years ago #

  3. cheart
    Member
    Posted 2 years ago #

    Most of that doesn't make sense to me...how do I even begin to fix my errors?

  4. Samuel B
    moderator
    Posted 2 years ago #

    click on the line numbers beside each error and it will show you where the problem is
    as you fix one, you fix several as they are cascading errors

  5. mechx1
    Member
    Posted 2 years ago #

    In your style sheet, for the selector

    #sidebar ul li {
    	list-style-type: none;
    	list-style-image: none;
    	margin-bottom: 15px;
    	border-left10px solid;border-color:#ffffff;}

    add a : between border-left and 10px. For the selector:

    #sidebar ul ul, #sidebar ul ol {margin: 15px 0 0 20px;border-left10px solid;}

    same fix. and again in

    #sidebar ul ul li, #sidebar ul ol li {margin: 5px 0 0;padding: 0;border-left10px solid;}

    a few lines down.

    There may be a positioning issue with this theme. The page width is 950px. #content is 570px. #sidebar is 265px wide and positioned to the right of #content using margin-left of 665px (I've never liked this method, but I guess that's my issue). add a 1px border-left on #sidebar, you have 19px to play with (265+665+1). The 20px of padding-left added to #sidebar shouldn't affect anything, but you never know how browsers will add this up (especially IE).
    The first thing to do is fix the errors, so that the borders are rendered as intended. I guess I would reduce the padding-left in #sidebar to 0 as a test to ensure that it doesn't have any effect, then re-instate it if it doesn't. Then reduce margin-left in #sidebar in increments to see if the sidebar moves back into place.

  6. cheart
    Member
    Posted 2 years ago #

    Ok I got some of the errors to go away, and @mechx1, I fixed the borders and removed the padding with no change.

    Also, for the very first error here it's put there automatically isn't it? By linking to my theme? How do I edit that to fix it?

    Also...could any of these errors fix my sidebar problem?? It happened before in my old HTML coding ages ago when I used all PHP includes and Cutenews for blogging, which I never resolved, either. And most of those errors are
    problems, which don't make any sense to me, since it's working to move my text down? Ugh -_-

  7. cheart
    Member
    Posted 2 years ago #

    ah the code tags didn't work...br is what I meant by not making any sense.

  8. hellomatt
    Member
    Posted 2 years ago #

    You do not need to use a margin-left like that for your sidebar. Also, why do you have a negative margin-top for your content div? Before you proceed, take out ALL margins and paddings from your CSS for the #content and #sidebar.

    Then try this:

    #content{
    width: [#]px;
    float:left;
    padding-left: [#];}
    
    #sidebar{
    width: [#]px;
    float:right;
    padding-right: [#}}

    Using a float right will add a margin of sorts between the two divs. ALL numbers in the above code must add up to 950px (or less).

  9. cheart
    Member
    Posted 2 years ago #

    @hellomatt

    I replaced everything that you said, and I had the margin-top because it had a large white space above my posts, which is now gone. Also, it didn't fix my problem, either...my sidebar is still pushed down on .PHP pages...

    http://www.chelseasheart.com/site/info.php

    Could it be my theme in general? I tried the default theme, and that was REALLY messed up on the .php page...So...I'm still as frustrated as ever -.-

    I appreciate everyone's help so far.

  10. cheart
    Member
    Posted 2 years ago #

    Ahh! Nevermind...It's fixed. Thank you hellomatt!

  11. hellomatt
    Member
    Posted 2 years ago #

    No problem! Did you end up using my css?

    I followed you on twitter (@flybetweenfalls) so please don't hesitate to let me know if you need any help at all.

  12. cheart
    Member
    Posted 2 years ago #

    Yes I did, thanks again! Hah, I had a small typo earlier from copying+pasting, which is why I said it didn't fix my problem. And I do believe the generator I used for my layout css used the margins which messed everything up...

    And great! I appreciate it very much.

Topic Closed

This topic has been closed to new replies.

About this Topic