Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7053015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:27:12+00:00 2026-05-28T03:27:12+00:00

I am building a content area that is going to go on the bottom

  • 0

I am building a content area that is going to go on the bottom of an article page featuring a top ten list of items. The content in the list-items is an image with a caption, and a paragraph of text. The list item backgrounds will alternate between white and grey.

The Image and caption need to be floated left, so I have wrapped them in a div named .col, and floated the div left. However, no matter how I modify my CSS, the list-items will not inherit the height of the .col with the image ad caption.

I cannot do a fixed height for the list-items, because the content is going to be pulled in dynamically, and needs to scale with it. I feel like I have tried every alteration to get this puppy to work, and none of my edits will take, so I figured I would post here to query some assistance.

My HTML:

               <ul class="bestOf">
                    <li class="dark">
                        <div class="col">
                            <img src="../images/article/1.png" />
                            <p class="caption">Sinead O’Connor Gets Married gretvh in Pink Cadillac</p>
                        </div>
                        <p>2012 Ford Mustang Boss 302: A few mags have called it the best Mustang ever, and it’s hard to disagree. I know I’d choose this over a Shelby GT500, despite the latter’s more powerful engine. The Boss is a track car for the street, or a street car for the track. It doesn’t matter which. It behaves itself in traffic, turns into a beast when pushed, and has a glorious soundtrack. </p>
                    </li>
                    <div class="clearfix"></div>
                    <li class="light">
                        <div class="col">
                            <img src="../images/article/1.png" />
                            <p class="caption">Sinead O’Connor Gets Married gretvh in Pink Cadillac</p>
                        </div>
                        <p>2012 Ford Mustang Boss 302: A few mags have called it the best Mustang ever, and it’s hard to disagree. I know I’d choose this over a Shelby GT500, despite the latter’s more powerful engine. The Boss is a track car for the street, or a street car for the track. It doesn’t matter which. It behaves itself in traffic, turns into a beast when pushed, and has a glorious soundtrack. </p>
                    </li>
                    <div class="clearfix"></div>
                    <li class="dark">
                        <div class="col">
                            <img src="../images/article/1.png" />
                            <div class="clearfix"></div>
                            <p class="caption">Sinead O’Connor Gets Married gretvh in Pink Cadillac</p>
                        </div>
                        <p>2012 Ford Mustang Boss 302: A few mags have called it the best Mustang ever, and it’s hard to disagree. I know I’d choose this over a Shelby GT500, despite the latter’s more powerful engine. The Boss is a track car for the street, or a street car for the track. It doesn’t matter which. It behaves itself in traffic, turns into a beast when pushed, and has a glorious soundtrack. </p>
                    </li>
                </ul>
                <div class="hr"></div>

My CSS:

article ul.bestOf {
    display:block;
    position:relative;
    width:600px;
    height:auto;
}
article ul.bestOf li.light, article ul.bestOf li.dark {
    display:block;
    position:relative;
    width:600px;
    height:100%;
    padding:5px;
    margin:5px 0 5px -40px;
    border:1px solid #eee;  
}
article ul.bestOf li.light {
    background:fff;
}
article ul.bestOf li.dark {
    background:#eaeaea; 
}
article ul.bestOf .col {
    display:block;
    position:relative;
    width:200px;
    height:auto;
    float:left;
}
article ul.bestOf .col img {
    display:block;
    width:186px;
    height:124px;
    float:left; 
    padding:0 10px 0 0;
}
article ul.bestOf li .col .caption {
    display:block;
    position:relative;
    width:200px;
    height:auto;
}
article .bestOf li p {
    display:block;
    margin:3px 0 0 0;
}

You can see a working demo of the page on my web server.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:27:12+00:00Added an answer on May 28, 2026 at 3:27 am

    You’re using clearfix slightly wrong (this one).

    You don’t do this:

    <li class="element-that-i-want-to-contain-floats"></li>
    <div class="clearfix"></div>
    

    You do this instead:

    <li class="clearfix"></li>
    

    For the avoidance of any doubt, your HTML should look like this:

    <li class="clearfix dark"> .. </li>
    <li class="clearfix light"> .. </li>
    <li class="clearfix dark"> .. </li>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a menu control that consists of a header area and a content
I'm building a page that will be using ajax to update a main content
I'm building a website with user generated content. On the home page I want
I am building a website that would serve dynamic content. All communication between server/browser
I'm building a site with django that lets users move content around between a
I'm building a site using CodeIgniter that largely consists of static content (although there
I am building a script that generates a table of content (as ) of
We're building a very content rich site in Drupal. It's my first time working
I am building a custom Content Management System for my client, using C#2008, ASP.Net
I'm building some custom content types to capture customer data on a website. Admins

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.