SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2007
    Location
    London, UK
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Content getting 'stuck' under floated div... Can't work this out!

    Hi there,

    I'm working on a basic site for a friend - it's powered by Wordpress and I'm currently trying to code the layout but I'm having problems.

    Example: http://www.carolinekernick.co.uk/?page_id=8

    For some reason the gallery images are getting 'stuck' underneath the navigation bar on the left, even though they're nowhere near it and the container div goes up as far as the sidebar's start. I can't figure this out for the life of me, I've been trying too many hours now considering this is mostly a favour for a friend!

    Would appreciate if any of you guys could provide an answer to this, sometimes all it takes it a fresh pair of eyes!

    The stylesheet can be found here (ignore the stylesheet header information, I've just developed my custom theme from the default Wordpress theme): http://www.carolinekernick.co.uk/wp-...ault/style.css but if you need any more information, please ask.

    Thanks

    - Roo

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,596
    Mentioned
    411 Post(s)
    Tagged
    6 Thread(s)
    Is this happening in a particular browser? I can't see anything wrong in firefox.

  3. #3
    Ripe Tomatos silver trophybronze trophy Rayzur's Avatar
    Join Date
    Jun 2007
    Location
    Texas
    Posts
    4,174
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    You have set clear:both on the .ngg-galleryoverview div.
    That has caused it to clear (drop below) the floated sidebar, remove it and all is well.
    Code:
    .ngg-galleryoverview {
        overflow: hidden;
        margin-top: 10px;
        width: 100%;
        /*clear:both; remove this*/
        display:block !important;
    }

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,596
    Mentioned
    411 Post(s)
    Tagged
    6 Thread(s)
    Ah, well done Rayzur. I didn't understand the question. (Will have to read more carefully in future.)

  5. #5
    SitePoint Enthusiast
    Join Date
    Jul 2007
    Location
    London, UK
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Amazing, it would've taken me ages to spot that, thanks for your solution Rayzur and thanks for taking the time to look ralph.m!

    - Roo

  6. #6
    Ripe Tomatos silver trophybronze trophy Rayzur's Avatar
    Join Date
    Jun 2007
    Location
    Texas
    Posts
    4,174
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    For some reason the gallery images are getting 'stuck' underneath the navigation bar on the left, even though they're nowhere near it and the container div goes up as far as the sidebar's start.
    Hi Ralph,
    No worries, it just took a little digging around with firebug.

    As the OP mentioned, the parent div (.narrowcolumn .entry) was sitting at the same level as the floated sidebar. A test border showed what was going on with it.

    Code:
    .narrowcolumn .entry, .widecolumn .entry {
        line-height: 1.4em;
        border:1px solid red;/*test only*/
        }

  7. #7
    SitePoint Enthusiast
    Join Date
    Jul 2007
    Location
    London, UK
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Got ya thanks, I'll try not to make the same mistake in future!


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
  •