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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:43:12+00:00 2026-06-04T17:43:12+00:00

I have created a select list using PHP, and when clicking on it to

  • 0

I have created a select list using PHP, and when clicking on it to select an option from the drop down the option list jumps to the top of the page showing about 3 options, and the rest are off the page.

It only happens in Chrome. Is there a way to fix this using CSS?

Here’s the relevant code:

HTML

<tr>
    <td><label>Manufacturer</label></td>
    <td>
        <select id="prodManufacturer" class="validate[required]" name="prodManufacturer">
            <?php foreach($aAllManufacturer as $aManufacturer){ ?> 
                <option value="<?php echo $aManufacturer['prod_manufacturer_id']; ?>">
                    <?php echo $aManufacturer['prod_manufacturer_name']; ?></option>
            <?php } ?>
        </select>
    </td>
</tr>

CSS

#productFormContentWrapper select {
    margin: 0;
    padding: 0;
    color: #9d1116;
    font-size: 18px;
    padding: 3px;
}
  • 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-04T17:43:14+00:00Added an answer on June 4, 2026 at 5:43 pm

    According to Mozilla Developer Network:

    If the control is presented as a scrolled list box, this attribute
    represents the number of rows in the list that should be visible at
    one time. Browsers are not required to present a select elements as a
    scrolled list box.

    Simply omit the size attribute or set its value to 0 (or 1, if following the HTML5 specs, but this apparently causes legacy issues, so avoid it for now).

    See a live demo on jsFiddle.

    References:

    • select element on MDN
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have already created a report using list of data from my database. i
I am trying to create a drop down list using jQuery, PHP and mySQL,
I have a select list I've created in a form alter, however, when I
I am using JQuery and cakephp for my application. I have created a select
I have created a process using proc-open but under windows the stream-select does not
I have created a PHP form which requires the user to select a postcode
I have created a PHP code to echo the following div <div id=main_catsel> <select
I have a select list like such: <select name=taxonomy[1][] multiple=multiple class=form-select id=edit-taxonomy-1 size=7> <option
I have an events list created with php/mysql which displays up and coming events
I have created a dropdown list, which is working well in separate page: however,

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.