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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:27:41+00:00 2026-06-04T11:27:41+00:00

I have a list of form fields contained within ul and li structure. I

  • 0

I have a list of form fields contained within ul and li structure. I have simplified my markup to focus on a problem I have.

Here’s the markup:

<ul>
<li class="multiplechoice">
   <fieldset>
     <legend>my label</legend>
     <div class="description">My description</div>

          <ul>        
            <li>
              <button value="asdf" readonly="readonly"></button>
              <label>test12</label>
             </li>
             <li>
               <button value="0" readonly="readonly"></button>
               <label for="test23">test23</label> </li>
           </ul>

    </fieldset>
</li>
</ul>

And the CSS I have so far:

legend{
    float: left;
    width: 80px;
    margin-right: 20px;
}

.description{
    clear: both;
    float: left;
    width: 80px;
    margin-right: 20px;
}

ul{
    float: left;
}

Note: The div with the class description can either not exist, contain no text inside or contain text.

What I wish to do is to have the legend and the description both floated to the left. The description should be underneath the legend. The ul containing the buttons should be seperated by a margin from those floated items, be aligned to the top of the first float and aligned vertically.

Here’s a picture showing the current state of things:
enter image description here

I have been trying all sorts of floats and positioning, but can’t seem to get there. Can anyone advice as to how the desired result can be achieved?

I am looking for a CSS only solution, preferably no javascript please 🙂

Fiddle: http://jsfiddle.net/eHEcJ/

  • 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-06-04T11:27:43+00:00Added an answer on June 4, 2026 at 11:27 am

    I ended up just getting rid of the float on the ul and making it an inline-block:

    legend{
        float: left;
        width: 80px;
        margin-right: 20px;
    }
    
    .description{
        clear: both;
        float: left;
        width: 80px;
        margin-right: 20px;
    }
    
    ul{
        display: inline-block;
    }
    

    And the fiddle: http://jsfiddle.net/BU57V/

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

Sidebar

Related Questions

I have a list within Sharepoint, using a custom new form I have added
I have a basic unordered list with an input field/form below it. I would
I have created a list form that gets attached to a main form in
I have list of input area in the form with id like contact1_title, contact2_title,
I have nested list of the following form: my_list = [['Some1', '2', '3.6', '4.5',
I have a list of data of the form: [line1,a] [line2,c] [line3,b] I want
Hello i have a list view control, While the form is being loaded i
In the entry form of my wpf application, I have a list of buttons
I have a select list I've created in a form alter, however, when I
I have a html form which have a select list box from which you

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.