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 7513577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:13:36+00:00 2026-05-30T00:13:36+00:00

Currently I’m trying to implement a HTML 5 site. On one of the pages

  • 0

Currently I’m trying to implement a HTML 5 site. On one of the pages I I have the following HTML structure

<ul class="catList">
  <li class="cat rowStart">
    <h4>Title</h4>
    <p class="shortDesc">Consetetur sadipscing elitr... Consetetur sadipscing elitr... Consetetur sadipscing elitr...</p>
  </li>
  <li class="cat">
    <h4>Title</h4>
    <p class="shortDesc">Sanctus sea sed takimata ut vero voluptua...</p>
  </li>
  <li class="cat">
    <h4>Title</h4>
    <p class="shortDesc">At vero eos et accusam et justo duo dolores et ea rebum...</p>
  </li>
  <li class="cat rowEnd">
    <h4>Dozer Bags</h4>
    <p class="shortDesc">At vero eos et accusam et justo duo dolores et ea rebum... At vero eos et accusam et justo duo dolores et ea rebum... At vero eos et accusam et justo duo dolores et ea rebum... At vero eos et accusam et justo duo dolores et ea rebum...</p>
  </li>
  <li class="cat rowStart">
    <h4>Title</h4>
    <p class="shortDesc">Consetetur sadipscing elitr... Consetetur sadipscing elitr...</p>
  </li>
  <li class="cat">
    <h4>Title</h4>
    <p class="shortDesc">Sanctus sea sed takimata ut vero voluptua... Sanctus sea sed takimata ut vero voluptua... Sanctus sea sed takimata ut vero voluptua... Sanctus sea sed takimata ut vero voluptua... Sanctus sea sed takimata ut vero voluptua...</p>
  </li>
  <li class="cat">
    <h4>Title</h4>
    <p class="shortDesc">At vero eos et accusam et justo duo dolores et ea rebum... Sanctus sea sed takimata ut vero voluptua... Sanctus sea sed takimata ut vero voluptua... Sanctus sea sed takimata ut vero voluptua...</p>
  </li>
  <li class="cat rowEnd">
    <h4>Dozer Bags</h4>
    <p class="shortDesc">At vero eos et accusam et justo duo dolores et ea rebum...</p>
  </li>
  <li class="cat rowStart">
    <h4>Title</h4>
    <p class="shortDesc">Consetetur sadipscing elitr Sanctus sea sed takimata ut vero voluptua... Sanctus sea sed takimata ut vero voluptua...</p>
  </li>
  <li class="cat">
    <h4>Title</h4>
    <p class="shortDesc">Sanctus sea sed takimata ut vero voluptua</p>
  </li>
  <li class="cat">
    <h4>Title</h4>
    <p class="shortDesc">At vero eos et accusam et justo duo dolores et ea rebum. At vero eos et accusam et justo duo dolores et ea rebum. At vero eos et accusam et justo duo dolores et ea rebum. At vero eos et accusam et justo duo dolores et ea rebum.</p>
  </li>
  <li class="cat rowEnd">
    <h4>Dozer Bags</h4>
    <p class="shortDesc">At vero eos et accusam et justo duo dolores et ea rebum.</p>
  </li>
</ul>

The accompanying CSS is as follows:

.catList {
    overflow: hidden;
    background: sandybrown;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 1000px;
}
.catList li {
    float: left;
    width: 249px;
    margin: 0 1px 1px 0;
    background: orchid;
}
.catList li.rowStart {
    clear: both;
}

(the colours are obviously just for demonstration purposes 🙂 )

This layout works fine in IE8, and in Chrome, Firefox, Safari and Opera. The .rowStart list items get pushed to the next row, and all the following list items have their tops lining up fine with the first one as intended, regardless of whether all teh list items are the same height or not.

Howevern in IE7, the layout breaks quite badly. The .rowStart list item itself gets cleared as expected, but the following list items don’t appear to clear the previous row.

Is this because I’m trying to use HTML5 in IE7 or is there something I’m missing in my CSS?

I’m not worried about IE6 compatibility.

EDIT: Don’t know if this is relevant, but I’m basing the HTML on the HTML5 boilerplate, and am using modernizr.js

EDIT 2: Here’s the full document structure (ommitting the actual list, as you’ve seen that already)

<!DOCTYPE html><!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width" >
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" >
        <meta name="language" content="en" >
        <title>Title goes here</title>
        <link href="/css/html5.css" media="all" rel="stylesheet" type="text/css" >
        <link href="/css/core.css" media="all" rel="stylesheet" type="text/css" >
        <!--[if lte IE 7]> <link href="/css/ie7.css" media="all" rel="stylesheet" type="text/css" ><![endif]-->     
        <!--[if lt IE 7]> <script type="text/javascript/" src="/css/iepngfix/iepngfix_tilebg.js"></script><![endif]-->
        <script type="text/javascript" src="/js/jquery/core.js"></script>
        <script type="text/javascript" src="/js/modernizr-2.5.2.min.js"></script>
    </head>

    <body>
        <div class="siteWrap">
            <header>
                <p>Header stuff goes here</p>
                <nav class="topNav">
                    <ul class="headerLinks clearfix">
                        <li><a href="/">Home</a>
                        <li><a href="/">link 2</a>
                        <li><a href="/">link 3</a>
                        <li><a href="/">link 4</a>
                        <li><a href="/">link 5</a>
                    </ul>
                </nav>
            </header>
            <div class="main">
                <nav class="breadcrumbs">
                    <p>You are in:</p>
                    <ul>
                        <li><a href="/">Home</a></li>
                        <li>Breadcrumb 1</li>
                    </ul>
                </nav>
                <p>Catalogue preamble goes here</p>

                <ul class="catList">
                    <!-- ommitted because it's already in the question -->
                </ul>

                <p>Catalogue postamble goes here</p>

            </div>

            <footer>
                <p class="copyright"><small>&copy; Copyright Foo Bar 2012</small></p>
                <nav class="bottomNav">
                    <ul class="footerLinks">
                        <li><a href="#" class="social twitter">Follow on Twitter</a></li>
                        <li><a href="#" class="social facebook">Follow on Facebook</a></li>
                        <li><a href="#">Stockists</a></li>
                        <li><a href="#">Contact us</a></li>
                    </ul>
                </nav>
            </footer>
        </div>
    </body>
</html>

EDIT 3: Updated the list item contents to something more likely to cause IE7 to break

  • 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-30T00:13:38+00:00Added an answer on May 30, 2026 at 12:13 am

    Edit: removed old superfluous stuff

    Option 1, this css worked:

    .catList {
    overflow: hidden;
    background: sandybrown;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 1000px;
    overflow:auto;
    }
    .catList li {
    min-height:1px;
    float: left;
    width: 249px;
    margin: 0 1px 0px 0;
    background: orchid;
    min-height:1px;
    }
    .catList li.rowStart {
    clear: both; 
    }
    
    .catList li.spacer{
    font-size:1px;
    line-height:1px;
    text-height:1px;
    height:1px;
    margin:0;
    padding:0;
    width:1000px;
    background:#000;
    float:none;
    clear:both;
    }
    

    html:

    <ul class="catList">
      <li class="cat rowStart">
        <h4>Title</h4>
        <p class="shortDesc">Consetetur sadipscing elitr...</p>
      </li>
      <li class="cat">
        <h4>Title</h4>
        <p class="shortDesc">Sanctus sea sed takimata ut vero voluptua...</p>
      </li>
      <li class="cat">
        <h4>Title</h4>
        <p class="shortDesc">At vero eos et accusam et justo duo dolores et ea rebum...At vero eos et accusam et justo duo dolores et ea rebum...At vero eos et accusam et justo duo dolores et ea rebum...At vero eos et accusam et justo duo dolores et ea rebum...At vero eos et accusam et justo duo dolores et ea rebum...At vero eos et accusam et justo duo dolores et ea rebum...At vero eos et accusam et justo duo dolores et ea rebum...</p>
      </li>
      <li class="cat rowEnd">
        <h4>Dozer Bags</h4>
        <p class="shortDesc">At vero eos et accusam et justo duo dolores et ea rebum...</p>
      </li>
      <li class="spacer"></li>
      <li class="cat rowStart">
        <h4>Title</h4>
        <p class="shortDesc">Consetetur sadipscing elitr...</p>
      </li>
      <li class="cat">
        <h4>Title</h4>
        <p class="shortDesc">Bobilicius Sanctus sea sed takimata ut vero voluptua...Sanctus sea sed takimata ut vero voluptua...Sanctus sea sed takimata ut vero voluptua...Sanctus sea sed takimata ut vero voluptua...Sanctus sea sed takimata ut vero voluptua...Sanctus sea sed takimata ut vero voluptua...</p>
      </li>
      <li class="cat">
        <h4>Title</h4>
        <p class="shortDesc">At vero eos et accusam et justo duo dolores et ea rebum...</p>
      </li>
      <li class="cat rowEnd">
        <h4>Dozer Bags</h4>
        <p class="shortDesc">At vero eos et accusam et justo duo dolores et ea rebum...</p>
      </li>
      <li class="cat rowStart">
        <h4>Title</h4>
        <p class="shortDesc">Consetetur sadipscing elitr</p>
      </li>
      <li class="cat">
        <h4>Title</h4>
        <p class="shortDesc">Sanctus sea sed takimata ut vero voluptua</p>
      </li>
      <li class="cat">
        <h4>Title</h4>
        <p class="shortDesc">At vero eos et accusam et justo duo dolores et ea rebum.</p>
      </li>
      <li class="cat rowEnd">
        <h4>Dozer Bags</h4>
        <p class="shortDesc">At vero eos et accusam et justo duo dolores et ea rebum.</p>
      </li>
    </ul>
    

    Option 2: Nested Lists

    CSS:

    .catList {
        background: sandybrown;
        margin: 0;
        padding: 0;
        list-style: none;
        width: 1000px;
    }
    .catList li.catRow li {
        float: left;
        width: 249px;
        margin: 0 1px 1px 0;
        background: orchid;
        display:inline-block;
        }
    
    .catList li.catRow {
        float:left;
        width:1000px;
        clear:left;
        min-height:1px;
    }
    

    html:

    <ul class="catList">
        <li class="catRow">
            <ul>
                <li class="cat">
                    <h4>Title</h4>
                    <p class="shortDesc">Consetetur sadipscing elitr...</p>
                </li>
                <li class="cat">
                    <h4>Title</h4>
                    <p class="shortDesc">Sanctus sea sed takimata ut vero voluptua...Sanctus sea sed takimata ut vero voluptua...Sanctus sea sed takimata ut vero voluptua...</p>
                </li>
                <li class="cat">
                    <h4>Title</h4>
                    <p class="shortDesc">At vero eos et accusam et justo duo dolores et ea rebum...</p>
                </li>
                <li class="cat">
                    <h4>Dozer Bags</h4>
                    <p class="shortDesc">At vero eos et accusam et justo duo dolores et ea rebum...</p>
                </li>
            </ul>
        </li>
        <li class="catRow">
            <ul>
                <li class="cat">
                    <h4>Title</h4>
                    <p class="shortDesc">Consetetur sadipscing elitr...</p>
                </li>
                <li class="cat">
                    <h4>Title</h4>
                    <p class="shortDesc">Sanctus sea sed takimata ut vero voluptua...</p>
                </li>
                <li class="cat">
                    <h4>Title</h4>
                    <p class="shortDesc">At vero eos et accusam et justo duo dolores et ea rebum...</p>
                </li>
                <li class="cat">
                    <h4>Dozer Bags</h4>
                    <p class="shortDesc">At vero eos et accusam et justo duo dolores et ea rebum...</p>
                </li>
            </ul>
        </li>
    </ul>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently, I have: <html> <div class=yes1><span><img src=img></span></div> </html> <script> var x = ='yes1' var
Currently I have the following Mapping in my Controller: @RequestMapping( value = /add.html, method
Currently have the following expression: @[TMS_Dest] + \\ + @[TMS_Rename] + (DT_WSTR,4)DatePart(yyyy, GetDate()) +
Currently, I have a log file of messages in one table in a MySQL
Currently I have the code: <!-- More html code above --> <div id="loading" style="display:
Currently I have the following code to update the NSLevelindicator: [self.headerIndicator selfFloatValue:heightValue] Is there
Currently I am using HTML files for parts of my user interface. I display
Currently I'm starting a new Activity and calling finish on a current one. Is
Currently, I'm working on a project where I have a server - client relationship
Currently I have 2 ways of displaying images in a cell, which way will

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.