SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Evangelist
    Join Date
    Jul 2008
    Location
    Port Elizabeth, South Africa
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Box stuck in box above

    Hi -- please can anyone perhaps tell me why the navigation box (scroll down below content) headed "How To Eat Raw Foods" on this page:

    http://greensmoothie.com/

    is stuck inside the box above it, where the last words are "Comment via Facebook"

    AND hence all the boxes under the box "How To Eat..." are also stuck inside the box above ("Comment via...")

    YET on this page:

    ==> http://www.greensmoothie.com/misc/free.php

    it's not stuck inside the box above?

    I've checked the source, and on both pages the box ending in "Comment via Facebook" is followed by 5 div endings, viz. <\div><\div><\div><\div><\div>

    The only difference is that http://greensmoothie.com/ is done in wordpress, and http://www.greensmoothie.com/misc/free.php is not. But that shouldn't be a reason for a box to be stuck in a box above?

    thank you for your kind help, Val

  2. #2
    SitePoint Member
    Join Date
    May 2004
    Location
    Washington
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Val,

    I'm not seeing the clearing issue you mentioned. To me, the boxes appear to clear each other and the How to Eat Raw Foods is in its own container as seen in this screenshot:

    https://www.dropbox.com/s/pzjvgnndkv...2011.48.31.png

    We do see a few PHP warnings at the bottom of the page, though. Looking at your files, I can see the footnav.php doesn't exist, so you may want to update your code or replace this file, if needed.

    https://www.dropbox.com/s/a8ev58qqox...2011.58.32.png

    I hope that helps.
    Eric

  3. #3
    SitePoint Evangelist
    Join Date
    Jul 2008
    Location
    Port Elizabeth, South Africa
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ha ha that was you guys! footnav.php has been there for years! You must've somehow dropped + lost it in the backup+restore on 7/2. There's no way I'd be so sloppy as to not upload a php and - stretch your imagination + say I could've been so sloppy - then there's no way I could be at my site every day for years and not notice a missing php file Lucky you caught it. I better check all the other pages to see if anything else got lost on 7/2!

    Do you see how on this page:

    ==> http://www.greensmoothie.com/misc/free.php

    it displays correctly - the leafy green images are right against the edge of the browser window below the content box, as they are at the top of the content box.
    correct.gif

    but on the wordpress page:

    http://greensmoothie.com/

    the leafy green images are caught within the content box above so there's this huge gap each side - and as a result there's the gap each side all the way down to footnav:

    wrong.gif

    Somehow wordpress is not releasing the space after content div ends

  4. #4
    SitePoint Member
    Join Date
    May 2004
    Location
    Washington
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Val,

    So, the issue is that on your non-WP site, your #content div stops just before the How To Eat Raw Foods navigation block. And, the #content is confined to 1038px.

    Screenshot 2014-07-07 15.05.43.jpg

    The same is true for #content width on your WordPress theme, but in this case, your leaf divs are inside of the #content div, rather than outside of them as in your non-WP site, so their width is confined, just as it is for the divs that follow it.

    Screenshot 2014-07-07 15.06.06.png

    So, there are a few ways to fix. Easiest seems to be to re-jigger the markup in your WP template to close the #content div sooner for that template.

    I hope that helps.

    Eric

  5. #5
    SitePoint Evangelist
    Join Date
    Jul 2008
    Location
    Port Elizabeth, South Africa
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Eric - no, if you look at the code, you'll see the leaf divs are *outside* the content div. That's my point - that on both pages - wp and non-wp - all divs are properly closed (5 </div>s in all). e.g. On the greensmoothie.com page, the "view Source" looks like this:

    ...Comment via Facebook</a></li>
    </ul>
    </div>
    </div>
    </div>
    <!--End Loop--></div><!--txtbox-->
    </div><!--content-->

    <div id="leafup">
    <div class="leafuplft"></div>
    <div class="leafuprgt"></div>

    As you can see, content IS closed. This is why I can't understand WHY wordpress is not closing it. And instead is trapping the new div - <div id="leafup"> - inside #content.

    Would it make a difference if I ended the Loop somewhere else?

    thanks! - Val


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •