SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast kingjacob's Avatar
    Join Date
    Apr 2007
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sidebar being duplicated?

    I'm at a loss here. Whenever my main content is not as high as my sidebar, it appears like a sidebar is below it on the left.
    See example: ForTheKids | Citizen Science Quarterly
    Any thoughts to a cause would be welcome as I have not been able to find the bug.

  2. #2
    SitePoint Enthusiast PiontekMedia's Avatar
    Join Date
    May 2011
    Location
    Vermont
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you tried setting a min-height value for the content div? Hard to find the cause of the problem without any code.

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,777
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    It looks like you have an extra closing section element which is confusing the browser.

    Code:
            </div>
        </section>
        <!-- sidebar -->
        </section>
        <!-- content wrapper -->
        <article id="content-home" class="footer-slider row">

    Quote Originally Posted by PiontekMedia View Post
    Have you tried setting a min-height value for the content div? Hard to find the cause of the problem without any code.
    The op posted a link - just view source

  4. #4
    SitePoint Addict EarlyOut's Avatar
    Join Date
    Mar 2011
    Location
    Sector R
    Posts
    279
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Pump the page through a validator - there are some other, similar issues, like an unclosed <div> and some typos like:

    <i class"amp">

    (no equals sign).

  5. #5
    Community Advisor silver trophybronze trophy
    dresden_phoenix's Avatar
    Join Date
    Jun 2008
    Location
    Madison, WI
    Posts
    2,728
    Mentioned
    31 Post(s)
    Tagged
    0 Thread(s)
    As well as what was mentioned above...
    <div id="wrapper">
    <section id="container">
    aren't closed.. but what's getting me totally lost is the comments. I was giving the code quick glance... I saw that you had </section><!--Content wrapper-->.. which beg the question was that intended to be the close for <div id="wrapper"> or is it that are you missing an opening tag?

  6. #6
    SitePoint Enthusiast kingjacob's Avatar
    Join Date
    Apr 2007
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dresden_phoenix View Post
    As well as what was mentioned above...
    <div id="wrapper">
    <section id="container">
    aren't closed.. but what's getting me totally lost is the comments. I was giving the code quick glance... I saw that you had </section><!--Content wrapper-->.. which beg the question was that intended to be the close for <div id="wrapper"> or is it that are you missing an opening tag?
    The </section> was intended for the "container".

    Thanks yall, it ended up being an extra div sidebar, but can't quite remove it without the page falling apart. However, I ended up being able to fix it by just removing the background.

    Also @ PiontekMedia, if you're using chrome, just use right click(or two fingers for macs) and use inspect element, it's a wonderful debugging tool.

  7. #7
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,777
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by kingjacob View Post
    Thanks yall, it ended up being an extra div sidebar, but can't quite remove it without the page falling apart. However, I ended up being able to fix it by just removing the background.
    That's a bit of a risky approach and one that is likely to come back and bite you later.

    The page is still invalid and fixing the errors mentioned will indeed fix the page. You have badly nested elements and unclosed and stray tags that need fixing to be safe. IE hates missing tags and one tag can destroy a whole page when you least expect it.

    Of course the choice is up to you


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
  •