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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:49:51+00:00 2026-06-16T11:49:51+00:00

I have a jsFiddle here, please open in Internet Explorer and in one other

  • 0

I have a jsFiddle here, please open in Internet Explorer and in one other major browser:

http://jsfiddle.net/7sARw/47/

Now in the jsFiddle, just click on the “Add Question” button and it will append a row underneath. In the row it shows 2 rows of letter buttons (each row containing 7 letter buttons) and two buttons, one known as “Select All Answers” and other known as “Remove All Answers”.

Now in the major browser, the buttons are centered in the table which is fine. But in Internet Explorer it is not centered , it is still aligned to the left. Now the reason I believe it is doing this is because of the way the HTML is being formatted when appending the row: which seems to be going like this:

<tr><td><div><tr><td></td></tr></div></td></tr>

My question is that how can I change the format of the HTML so that it is valid but also be able to center everything in the appended rows in Internet Explorer?

Below is the CSS and jQuery/HTML of the code:

.answer { 
    min-width:100%;
    max-width:100%;
    padding-top:5%;
    padding-bottom:5%;
     }

.answerBtnsRow{
    background-color: #ffffff;
    border: #666666 1px solid;
    color: black;
    font-weight:bold;
    display:none;
    cursor:pointer;
    font-size:85%;    
    }    


    .allBtnsRow{
        text-align:center;
        cursor:pointer;
        font-size:85%;  
    }

    .allRemoveBtnsRow{
        text-align:center;
        cursor:pointer;
        font-size:85%;  
    }

Below is Jquery/HTML code:

function insertQuestion(form) {

    var context = $('#optionAndAnswer');
    var currenttotal = context.find('.answerBtnsOn').length;

    var $tbody = $('#qandatbl > tbody');
    var $tr = $("<tr class='optionAndAnswer' align='center'>");
    var $td = $("<td class='extratd'>");
    var $answer = $("<div class='answer'>3. Answer:<br/></div>");
    var $questionType = '';

    gQuestionIndex++;



    var $this, i = 0,
        $row, $cell;
    $('#optionAndAnswer .answers').each(function() {
        $this = $(this);
        if (i % 7 == 0) {
            $row = $("<tr/>").appendTo($answer);
            $cell = $("<td/>").appendTo($row);
        }
        var $newBtn = $(("<input class='answerBtnsRow answers' type='button' style='display:%s;' onclick='btnclick(this, " + gQuestionIndex + ");' />").replace('%s', $this.is(':visible') ? 'inline-block' : 'none')).attr('name', "value[" + gQuestionIndex + "][]").attr('value', $this.val()).attr('class', $this.attr('class')).attr('id', $this.attr('id') + 'Row');
        $newBtn.appendTo($cell);

        i++;
    });    var $this = $(this);
    var $BtnsClass = '';

    $row = $("<tr/>").appendTo($answer);
    $cell = $("<td/>").appendTo($row);

    if ($questionType == 'True or False' || $questionType == 'Yes or No') {
        $BtnsClass = $("<input class='allBtnsRow btnsAll' type='button' style='display: none;' value='Select All Answers' onClick='selectAll(this);' /><input class='allRemoveBtnsRow btnsRemove' type='button' style='display: none;' value='Remove All Answers' onClick='removeAll(this);' />");
    } else {
        $BtnsClass = $("<input class='allBtnsRow btnsAll' type='button' value='Select All Answers' onClick='selectAll(this);' /><br/><input class='allRemoveBtnsRow btnsRemove' type='button' value='Remove All Answers' onClick='removeAll(this);' />");
    }
    $BtnsClass.appendTo($cell);





    $tr.append($td);
    $td.append($answer);
    $tbody.append($tr);

    count++;
    $('#optionAndAnswer .answerBtns').hide();

    updateAnswer($answer, gQuestionIndex);



}
  • 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-16T11:49:53+00:00Added an answer on June 16, 2026 at 11:49 am
    var $td = $("<td class='extratd'>");
    var $answer = $("<div class='answer'>3. Answer:<br/></div>");
    

    should likely be

    var $td = $("<td class='extratd' />3. Answer:<br/></td>");
    var $answer = $("<table class='answer'><tbody></tbody></table>");
    

    or

    $cell = $("<td>3. Answer<br/></td>").appendTo($row);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jsFiddle here, please open in Internet Explorer and in one other major
I have a jsfiddle here: http://jsfiddle.net/ybZvv/61/ Please follow steps in fiddle: When you open
I have created a JSFiddle of my case here: http://jsfiddle.net/gGCaX/ (Please take a look,
Please check out my code here http://jsfiddle.net/bYDPr/20/ So I have some HTML textarea elements
I have a jsfiddle here : http://jsfiddle.net/hhimanshu/eLhLS/1/ Current: On keypress, it keeps on appending
I have a fiddle here - http://jsfiddle.net/hhimanshu/SDr3F/2/ The left pane is already available I
I have a fiddle here http://jsfiddle.net/WULsZ/1/ I load jQuery first and the code is
I have a layout setup which can be view here: http://jsfiddle.net/Pn3ts/ It all works
I have a CSS mouseover slider fully functional here http://jsfiddle.net/gU4sw/13/ . When I add
JSfiddle: http://jsfiddle.net/ybZvv/57/ I have a fiddle here where the user can append row and

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.