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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:48:00+00:00 2026-05-27T10:48:00+00:00

I am currently restyling a form, and now I’m fighting with a CSS issue:

  • 0

I am currently restyling a form, and now I’m fighting with a CSS issue:

  • To see it, go here: http://temp.meyerdevelopment.nl/

  • Then click on the “Continue” link, to be found under the “Checkout as
    a Guest or Register” heading.

You’ll see a bunch of fields, and the problem lies with the space between the “Last Name” and “Company” fields. I believe the margins of the elements should fuse, resulting in equal spacing between all elements.

The top-margin of the “First Name” field and the bottom-margin of the “Last Name” field aren’t incorporated into the height of the enclosing div. This is correct in my opinion.

Problem:
Somehow the bottom margin of the “Last Name” field is incorporated in the enclosing <li>. I believe this shouldn’t happen.

Also note that the top-margin of the “First Name” field isn’t incorporated into the the height of the <li> element (which I believe IS correct). How can this be???

PS:
The reason I haven’t tried changing the weird mark-up is because I can’t. I suppose I could, but it would be a little complex, so I’m staying with changing the styles.

Edit:
I found the root cause of my problem:
The LI element is the target of a major clearfix CSS rule that comes with the standard Magento CSS. The selector+rule that causes the problem is:

li:after {
  content: ".";
}

This CSS-generated period is what prevents the margin of the inner DIVs to fuse with the margins of the siblings (other LIs) of their container (the LI). Because the period is added AFTER the LI, the bottom margin CANNOT fuse, while the topmargin can and does.

  • 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-27T10:48:01+00:00Added an answer on May 27, 2026 at 10:48 am

    It’s because .field elements have 4px margins above and below. Have you tried the selector “.field + .field”? Doing just a margin-top on that means that you only have margin spacing for fields when they are consecutive. Do you think that would work?

    Edit: It does look strange, though, that the li.fields considers that bottom margin, but div.customer-name doesn’t. In any case, you can try the selector I suggested, and report your findings.

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

Sidebar

Related Questions

Currently IIS sends an expires http header of yesterday minus 1 hour on ASP.NET
This question is related to this question yesterday . Please see current jsfiddle here
I'm currently restyling my web application, my friend suggested me to use a framework
Aloha, I need to match page.aspx?cmd=Show&id= but not match http://random address/page.aspx?cmd=Show&id= Right now I'm
I am currently restyling a website, but part of the site takes a string
I am currently working on a Magento store (ver. 1.6.2.0) however when i click
currently i have a form, that generates a Drop-Down-Select from my category-entity: $builder ->add('category',
Currently, I don't really have a good method of debugging JavaScript in Internet Explorer and
Currently my workflow with Emacs when I am coding in C or C++ involves
Currently we have a hybrid ASP/PHP setup connecting to a SQL Server 2005 database.

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.