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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:12:16+00:00 2026-05-31T17:12:16+00:00

I’m having a particular issue that I was able to zero in on with

  • 0

I’m having a particular issue that I was able to zero in on with a particular structure, and I’m not entirely sure why.

Here’s the situation: designing a site that is served specifically to iPads, so I do most of my development in Windows Safari (other browsers don’t matter). jQTouch generally creates pages of <ul>‘s with <li> items for each, so my forms contain all of these. The particular issue I am having is that when I have a <ul> block outside of a <form> tag, it displays correctly (as in, it stretches the <ul> to match whatever height it’s contents takes). An easy way to visually check this is to see the background color of the <ul>. However, whenever I put it into a form tag, the <ul> can no longer tell the height of its contents, and Safari assigns it height: 0px (in the first instance, its assigned a pixel amount that is calculated with its contents’ heights, == correct)

Tried to pull out only the important HTML tags and CSS styling in the example – copied the composite CSS that Safari was applying to each tag in order to show precisely what my application is generating across all classes etc., and uses purposefully vague selectors for the example:

CSS:

div {
    -webkit-box-flex: 1;
    -webkit-box-orient: vertical;
    -webkit-transform: matrix(1, 0, 0, 1, 0, 0);
    -webkit-user-select: none;
    background-color: #DADFE3;
    background-image: -webkit-repeating-linear-gradient(left, transparent, transparent 1px, #D4DADF 1px, #D4DADF 7px);
    bottom: auto;
    display: -webkit-box;
    font-family: 'Helvetica Neue', Helvetica;
    left: 0px;
    margin-bottom: 0px;
    margin-left: 0px;
    margin-right: 0px;
    margin-top: 0px;
    min-height: 100%;
    overflow-x: hidden;
    padding-bottom: 0px;
    padding-left: 0px;
    padding-right: 0px;
    padding-top: 0px;
    position: absolute;
    right: auto;
    top: 0px;
    width: 1406px;
    z-index: 10;
}

form {
    -webkit-margin-after-collapse: separate;
    -webkit-margin-before-collapse: separate;
    -webkit-user-select: none;
    bottom: auto;
    display: inline-block;
    font-family: 'Helvetica Neue', Helvetica;
    height: 671px;
    left: auto;
    margin-bottom: 0px;
    margin-left: 0px;
    margin-right: 0px;
    margin-top: 0px;
    padding-bottom: 0px;
    padding-left: 0px;
    padding-right: 0px;
    padding-top: 0px;
    position: static;
    right: auto;
    top: auto;
    width: 1406px;
}

ul {
    -webkit-box-shadow: rgba(255, 255, 255, 0.148438) 0px 1px 0px 0px;
    -webkit-margin-after-collapse: separate;
    -webkit-margin-before-collapse: separate;
    -webkit-user-select: none;
    background-color: maroon;
    border-bottom-color: #CACFD6;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-bottom-style: solid;
    border-bottom-width: 1px;
    border-left-color: #CACFD6;
    border-left-style: solid;
    border-left-width: 1px;
    border-right-color: #CACFD6;
    border-right-style: solid;
    border-right-width: 1px;
    border-top-color: #CACFD6;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-top-style: solid;
    border-top-width: 1px;
    bottom: auto;
    box-shadow: rgba(255, 255, 255, 0.148438) 0px 1px 0px 0px;
    color: gray;
    display: block;
    font-family: 'Helvetica Neue', Helvetica;
    font-size: 18px;
    font-style: normal;
    font-variant: normal;
    font-weight: bold;
    left: auto;
    line-height: normal;
    list-style-type: disc;
    margin-bottom: 0px;
    margin-left: 0px;
    margin-right: 0px;
    margin-top: 10px;
    padding-bottom: 0px;
    padding-left: 0px;
    padding-right: 0px;
    padding-top: 0px;
    position: static;
    right: auto;
    text-shadow: white 0px 1px 0px;
    top: auto;
    width: 1335px;
    clear: both;
}

li {
    width: 40%;
    float: left;
    display: inline-block;
    height: 30px;
}

HTML:

<html>
    <head>
        <title>Test</title>
        <style type="text/css">
            /* CSS above here */
        </style>
    </head>
    <body>
        <div>
            <form action="/some/action" method="GET">
                <ul>
                    <li>Some items</li>
                    <li>Some items</li>
                    <li>Some items</li>
                    <li>Some items</li>
                    <li>Some items</li>
                    <li>Some items</li>
                </ul>
            </form>

            <ul>
                <li>Some items</li>
                <li>Some items</li>
                <li>Some items</li>
                <li>Some items</li>
                <li>Some items</li>
                <li>Some items</li>
            </ul>
        </div>
    </body>
</html>

I can attempt to provide more information if needed – but putting together the above code in Safari (Win) will replicate the issue: UL inside of form has no height, UL outside does.

Edit: To quickly show what I’m seeing visually, I took a screenshot and pointed out what I’m seeing:
Above issue in Safari on Windows 7 (Safari 5.1.2)

Edit: Apparently this occurs the same way in Firefox. Was doing some heavy AJAX work and am more familiar with Firefox’s Firebug extension for that purpose, so I checked what it looked like in Firefox and it occurs there, too. The UL has a height of 0 if its not explicitly set.

  • 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-31T17:12:17+00:00Added an answer on May 31, 2026 at 5:12 pm

    Add overflow:auto; to you list of rules for the UL tag, or remove the float:left; rule for your LI tag.

    jsFiddle example of the overflow:auto; rule added.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am doing a simple coin flipping experiment for class that involves flipping a
We're building an app, our first using Rails 3, and we're having to build
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

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.