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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:42:43+00:00 2026-05-30T16:42:43+00:00

I have a script which generates input boxes dynamically, var gridBuilder = function() {

  • 0

I have a script which generates input boxes dynamically,

    var gridBuilder = function() {
    var html = [];
    for (var index = 1; index <= gridSize * gridSize; index++) 
    {

        html.push("<input id='id" + index + "' class='field' type='text' size='3' maxlength='3' name='name" + index + "'/>");
    }
    return html.join("");
};

I am applying the following CSS.

.field {  
  padding: 5px;  
  font-size: 15px;  
  text-shadow: 0px 1px 0px #fff;  
  outline: none;  
  background: -webkit-gradient(linear, left top, left bottombottom, from(#bcbcbe), to(#ffffff));  
  background: -moz-linear-gradient(top,  #bcbcbe,  #ffffff);  
  -webkit-border-radius: 3px;  
  -moz-border-radius: 3px;  
  border-radius: 3px;  
  border: 1px solid #717171;  
} 

My css is linked to the correct class isn’t it? The issue is that none of the CSS defined in .field is showing up on my input.

  • 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-30T16:42:44+00:00Added an answer on May 30, 2026 at 4:42 pm

    It works as expected for me !

    I made you a jsFiddle so you can see if you are doing something different 🙂

    http://jsfiddle.net/neYXk/3/

    Maybee you are doing a document.write in a bad place an “overwriting” the core html includeing your css ?

    You should start using http://jquery.com/ ! Makes js life so much easier 🙂 !

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

Sidebar

Related Questions

I have a php script (generator.php) which generates certain HTML/XML/SVG depending on various conditions.
I have an AJAX call which dynamically generates a HTML form. This form contains
I have a form which generates an HTML table using a PHP script on
I have a page which is largely created by DOM script, which generates a
I have a problem with following script. It generates a list of places which
I have this script which basically toggles a bgColor class on and off so
Using the following script: $(#some_button).click(function() { var changed = []; $( 'input[id$=_0]' ).each(function() {
I have a basic script which generates dropdowns for age verification. What I want
I have a PHP page which generates an HTML table. At the bottom of
I have a script which generates queries in the following fashion (based on user

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.