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

  • Home
  • SEARCH
  • 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 8388517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:29:19+00:00 2026-06-09T18:29:19+00:00

I created an HTML form that incorporates a CSS list. However, I would like

  • 0

I created an HTML form that incorporates a CSS list. However, I would like to add 10 pixels or so after the “Last Name” field and after the “Confirmation” field of the below HTML form. Is this possible?

<form>
<ul>
<li><label for="firstName">First Name:</label></li>
<li><input type="text" name="firstName" size="35" id="firstName"/></li>
<li><label for="lastName">Last Name:</label></li>
<li><input type="text" name="lastName" size="35" id="lastName"/></li>

<li><label for="passid">Password:</label></li>
<li><input type="password" name="password" size="35" id="password"/></li>
<li><label for="confirmation">Confirmation:</label></li>
<li><input type="password" name="confirmation" size="35"id="confirmation"/></li>

<li><label for="email">Email:</label></li>
<li><input type="text" name="email" size="35" id="email"/></li>
</ul>
</form>

I made several CSS and HTML modifications, like the following, which had no effect:

form ul li.extra
{
    margin-bottom:15px;
}

<li class="extra"><label for="lastName">Last Name:</label></li>
<li class="extra"><input type="text" name="lastName" size="35" id="lastName"/></li>

I’ve also tried simpler things, like HTML line breaks, but none had any effect on the layout of my page.

Is is possible to adjust the margin-bottom property of an individual list item?

Thank you!

  • 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-09T18:29:20+00:00Added an answer on June 9, 2026 at 6:29 pm

    It’s not ideal, but a quick way is to set the inline style of the LI you’re interested in:

    <li style="margin-bottom: 15px;">Whatever</li>
    

    But a better way would be to add the class, which is obviously easier to apply to other individual LI tags:

    li.single_li {
        margin-bottom: 15px;
    }
    
    <li class="single_li">Whatever</li>
    

    If it’s not working, it could be being overridden by a parent class / style, try the following in your css / style:

    CSS

    li.single_li {
        margin-bottom: 15px !important;
    }
    

    Inline

    <li style="margin-bottom: 15px !important;">Whatever</li>
    

    The addition of !important makes sure it gets applied and not overwritten by a parent class.

    Added jsFiddle example of inline style

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

Sidebar

Related Questions

I would like to have a custom snippet of html form code that takes
I created a html form to enable users to update data. However the input
I've created a dynamic HTML form that uses jQuery and customizes the form fields
I have created an html form. it consist of several drop down list for
I have a web page that I created with html tags(form and table) and
I've created an HTML form that has checkboxes that are checked dynamically due to
I've created a feedback form that I'd like to submit in my application layout.
For my html form, it seems that I'm unable to create cross browser hover
When you have an ASP.Net MVC form created by Html.BeginForm(), how do fields inside
How can I create a helper like the Html.Form helper, which closes the tag

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.