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

The Archive Base Latest Questions

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

<ul> <li> <div id=’div1′><div> <div id=’div2′><div> </li> <li> <div id=’div3′><div> <div id=’div4′><div> </li> <li>

  • 0
<ul>
    <li>
       <div id='div1'><div>
       <div id='div2'><div>
    </li>
    <li>
       <div id='div3'><div>
       <div id='div4'><div>
    </li>
    <li>
       <div id='div5'><div>
       <div id='div6'><div>
    </li>
</ul>

Above html will design following design

 li li li
|__|__|__| -> odd DIVs
|__|__|__| -> even DIVs

I want to merge all the odd DIVs and place some text on the top of it.

 li li li
 |__|__|__| -> odd DIVs
 |__|__ __| -> even DIVs

Is there any way to do this?

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

    Try using this:

    li {
        display: inline-block;
    }
    li div:last-child {
        display: inline;
    }
    

    Ive tested it in Firefox 5 only, and it seems to work.

    See an example here http://jsfiddle.net/ffESR/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

$('div.box').html(hello) puts the word hello inside all my div's of class 'box'. They all
div li:first-child what does above css selector target? First li's of every div on
box div will be hidden during pageload, when we hover on it it should
My div is closing itself. <html><head><title></title> <script type=text/javascript charset=utf-8 src=jquery-1.7.min.js></script> <script> $(document).ready(function(){ $(#wrapper).append( '<div
%div{:id=>[Arsenal[@home.page_color]], :class=> page} I'm using the following constant Arsenal in my Home#Page view. Where
the div with the word test it in, just will not go up the
$('div#nutrition-fact-content table tr:first td:first').addClass('product-volume'); $('div#nutrition-fact-content table tr:first td:last').addClass('flavor-name'); In the above code, the second
Div box dimensions are measured using jQuery with following code: $(document).ready(function(){ var h =
The div inside another div picture and code below. Because there will be text
This div will have a computed height of 104.5px (in most recent Chrome, FF,

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.