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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:44:47+00:00 2026-05-26T15:44:47+00:00

I have this markup: div#wrapper ul#container1 li#box1 li#box2 li#box3 ul#container2 li#box4 li#box5 li#box6 The

  • 0

I have this markup:

div#wrapper
  ul#container1
    li#box1
    li#box2
    li#box3
  ul#container2
    li#box4
    li#box5
    li#box6

The screen’s width is enough to display 5 boxes on one row, but the whole container 2 is below container 1 when I float left the uls

How can I have the first line on the screen display boxes 1 to 5 and the second line box 6 (as if all lis were inside a single container and floated left) while keeping the lis inside two different containers ?

Thanks

  • 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-26T15:44:48+00:00Added an answer on May 26, 2026 at 3:44 pm

    Give the ul elements display: inline and the li elements display: inline-block

    See here: http://jsfiddle.net/hW7Aj/1/

    HTML

    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li> 
    </ul>
    <ul>
        <li>4</li>
        <li>5</li>
        <li>6</li> 
    </ul>
    

    CSS

    ul {
        display: inline;
    }
    
    li {
        display: inline-block;
        width: 80px;
        border: 1px solid black;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have this html markup: <div id=wrapper> <pre class=highlight> $(function(){ // hide all
I have this markup in an MVC app. <div id=ingredientlistdiv> <% Recipe recipe =
I have my markup like this (for argument's sake) <div id=content></div> <div id=layout></div> <div
Let's say I have this markup: <div class=foobar> <div style=height:expression(this.parent.style.height + 'px')></div> </div> My
I have the following HTML markup: <body> <div class=wrapper> <div class=head> <p class=title>title</p> <a
I have this markup x 3: <div class=features> <span class=overlay><img src=img/webdesign.png /></span> <h2>Web Design</h2>
Say i have this markup: <div class='current'> </div> <div class='current'> </div> <div class='current'> </div>
I have a fairly complicated problem. The usual markup (no problems here): <div class=wrapper>
I have this markup <div id=standards> <table border=1> <thead> <tr> <th>Markup</th> <th colspan=4>HTML</th> <th
I have this markup: <div id=container> <h1>Heading</h1> <p>Some text</p> <div class=foo>Some stuff</div> <div class=foo>Some

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.