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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:18:09+00:00 2026-06-04T21:18:09+00:00

I am adding a place holder div in my code so it can later

  • 0

I am adding a place holder div in my code so it can later be replaced by some html. This is for a little templating engine I am writing (something like handlebars.js) so I don’t have any control over what the parent element is.

Something like this:

<div class="container">
    <ul>
        <div id="4FEA2092330"></div>
    </ul>
</div>

if I get the parent of the placeholder div I get the ul which is great.

However if the placeholder is inside a table like this:

<div class="container">
    <table>
        <div id="4FEA2092330"></div>
    </table>
</div>

The parent of the placeholder div is the container div not the table.

Further testing shows that if I use a tr in the table (instead of the div) the parent routine returns the table.

Any ideas why that would happen and how I might be able to prevent this.

  • 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-04T21:18:10+00:00Added an answer on June 4, 2026 at 9:18 pm

    Your markup is invalid. A table can’t directly contain a <div> like that. The way to avoid the undesired behavior is to build a proper table.

    I think it’d work to wrap your <div> in a <td>. The necessary other parts of the table will be implicitly added around that.

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

Sidebar

Related Questions

When adding code to an onclick handler, are there any limitations to what can
why after two click this code adding several input together? $('.add_input').live('click', function () {
I am trying to add/remove UILabels to a ScrollView. The adding takes place just
In particular, I am adding a compass to my app. I want to place
Adding functionality to a class can be done by adding a method or by
I found this code on SO, which is great for using PDO and the
I'm adding some user feedback mechanism into my app. The user types some comments
On postback : How can I access ASP.NET controls in my code-behind file, which
I have the following html: <div id=cats-and-links> <div class=cat favorites> <h2>Favorites</h2> <ul class=ui-sortable> <li
I am adding a textfield to my view like this: UITextField* tf_email = [[UITextField

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.