Alteration in relational shift of division placement

My webpage is divided into three sections with the following proportions: 15% - 65% - 20%

In the right section, there is a div with the ID alchemy. I want to set the height of this div using

<div style="height:150px;">
.

However, when I set the height in this way, the middle section also appears at a height of 150px. Why is that?

<tr>
    <div class="left">
  <td style="width:15%">
    <div style="position:absolute">
      <img src="https://graph.facebook.com/
<?php echo $user_id; ?>
/picture?type=large" style="position:fixed; top:60px; left:1px;">
      </div>
  </td>
</div>
<div class="middle">
  <td style="width:65%">
    <div class="input-button-collection">
      <div id="input-collection" class="input-group input-group-lg">

        <span class="input-group-addon">
          <i class="glyphicon glyphicon-link">
          </i>
        </span>

        <input id="url-input-box" type="url" class="form-control" name="url" placeholder="http://www.example.com">
      </div>
      <div id="error-msg" class="help-block">

        <i class="glyphicon glyphicon-exclamation-sign">
        </i>
        URL is invalid
      </div>
      <div class="rating-collection">
        <input type="number" name="rating" id="rating-input" class="rating" />
        <div>

          <span id="error-msg-rating" class="help-block">
            <i class="glyphicon glyphicon-exclamation-sign">
            </i>
            Please choose a rating
          </span>

        </div>
      </div>
      <div class="custom-input-button">
        <button id="submit-url-btn" type="submit" class="btn btn-primary btn-lg">
          Get Sentiment
        </button>
      </div>
      <div id="old-records" align="center">
      </div>
    </td>
  </div>
<div class="right">
  <td style="width:20%">
    <!-- 
<?php include 'logout.php'; ?>
-->
          <div id="alchemy" style="overflow:hidden; clear:both">
          </div>
      </td>
</div>
</tr>

Answer №1

This piece of code is in a chaotic state:

You have mistakenly placed some <td> elements inside <div> tags, which is incorrect. In HTML, the parent of a td should be a tr (table row).

I recommend reviewing the documentation on HTML tables and rectifying your code. Unfortunately, this mistake cannot be fixed as it does not adhere to standards.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The scroll bar will be automatically reset once the content inside is updated by using the $selector.html() function

I am looking to create a dynamic scrollable content feature. Initially, I retrieve the data and set the content as follows: $("#sub_menu li").on("click", function () { $("#gallery").html(get_html($(this).attr("id"))); $("#gallery").cs ...

Utilizing CSS to smoothly transition elements as they fill in empty space

As I have multiple blocks of content, I slide one to the side and then remove it. Once that is completed, I want the blocks below it to smoothly move up and fill the space. Check out this JSFiddle Example for reference HTML Code <div id="container"&g ...

After making changes to the DOM, the submit button no longer responds when clicked

Currently, I am working on a form that enables users to create a list of items corresponding to a model. In order to enhance user experience, I have incorporated autocomplete functionality for this model. In the relevant controller, I have implemented an ...

Is it possible to apply border-radius to selections, similar to how it is done in vscode

It was reminiscent of this... Visual Studio Code ::selection{ border-radius: 5px; } I attempted something similar to this, however it was not successful... ...

Having trouble with jQuery validation: Seeking clarification on the error

I have implemented some validations on a basic login page and added jQuery validation upon button click. However, the code is not functioning as expected. I have checked the console for errors but none were displayed. Here is the code for your review: ...

steps to adjust screen zoom back to default after automatic zoom in forms

I'm not very well-versed in javascript/jquery and have been on an extensive search for a solution to my specific problem. While I've come across some close answers, I am struggling to adapt them to fit my own scenario. On my website, I have a fo ...

Emphasize user-entered text using HTML and CSS

Here's a scenario: a text paragraph is displayed alongside an input box. The user must type the same text into the input box as shown in the paragraph. I'm aiming to highlight the paragraph text in color as the user types, to demonstrate progres ...

Determine the number of input tags within a div element by utilizing the closest property in jQuery

Sorry for the silly question, but I've been struggling to find a solution. Spent hours scratching my head. Here is my HTML structure: <div class= 'container'> <div class="someclass"> <input>some content</in ...

What is the best way to save inputted names as properties of an object and assign the corresponding input values as the values of those properties?

I am searching for a way to dynamically build an object where each property corresponds to the name of an input field and the value of that property is the input's value. Here is the HTML structure: <form> <fieldset> ...

Modify the table layout by incorporating images within separate div containers for each row

In my layout, there is a grey box element that contains a table with rows of small images. I want the table to automatically adjust based on the number of images so that when the grey box reaches its maximum size, the images move to the next row. Is this a ...

How can I showcase the index of `<tr>` and `<td>` elements in a dynamically generated table

How can I print the index of table rows and data on click in javascript? <html> <head> <title>Table Creation</title> <script language="javascript" type="text/javascript"> function createTable() { ...

show the popover only once the cursor has been hovering for a couple of seconds

Looking to customize the behavior of a bootstrap popover? Here's an example of using the popover to trigger on hover: $("#example").popover({ trigger: "hover" }); However, if you want the popover to appear after a few seconds of hover (e.g. 2 ...

Animate a box moving continuously from the right to the left using jQuery

I'm trying to create a continuous motion where a box moves right, then left, and repeats the cycle. However, I can only get it to complete one cycle. $(document).ready(function() { function moveBox() { $('#foo').css({ 'ri ...

jquery codeigniter is throwing an error 501, stating that the method is not implemented

I encountered an issue while attempting to submit a form using jQuery and CodeIgniter. The response displayed an error message "501 Method Not Implemented". This error specifically occurs when using a smartphone browser like Android. Below is the code snip ...

Using jQuery to dynamically add `<option>` elements with both disabled and selected attributes

After successfully appending an <option> element to my <select> tag with its corresponding value, text and placeholder attributes, I encountered some difficulty in determining the correct keyword for setting the disabled and selected properties ...

Troubleshooting a hover problem in CSS navigation bar

Having some trouble with the CSS menu on my website click here. I've tried adjusting the code, but can't seem to get all the menu levels to line up properly. As a beginner in CSS, I'm sure I'm overlooking something simple. When hovering ...

Video embedded in a plain CSS popup that automatically starts playing even before the popup is triggered

My goal is to incorporate a video into a minimalist CSS modal window, following the guidance provided here. While the setup works well overall, I encounter a issue where the video starts playing before the modal window is opened (I need to maintain the "au ...

Troubleshooting challenges arise with Bootstrap's button group spacing issue

I am encountering spacing issues with the markup provided below. <h2>Profitability Report</h2> <form method="post"> <div class="row"> <div class="col-md-12"> <div class="btn-group btn-group-toggle ...

Adding 7 days to a JavaScript date

Can you spot the bug in this script? I noticed that when I set my clock to 29/04/2011, it displays 36/4/2011 in the week input field! The correct date should actually be 6/5/2011 var d = new Date(); var curr_date = d.getDate(); var tomo_date = d.getDate( ...

The content inside the HTML body doesn't fully encompass the dimensions of the mobile screen

I am working on making my application flexible by using 100vw width and 100vh height for the components. Everything displays perfectly in any resolution on a computer browser, but when viewed on a mobile device, an empty background is drawn below the bod ...