Why is it so difficult for me to move it to the next line?

p {
  font-size: 150%;
}

body {
  background-image: url("images/gg.jpg");
  background-repeat: repeat;
}

.rTable {
  display: block;
  margin-top: 100px;
  margin-bottom: 200px;
  margin-right: 200px;
  margin-left: 450px;
}

.rTableHeading,
.rTableBody,
.rTableFoot,
.rTableRow {
  clear: both;
}

.rTableHead,
.rTableFoot {
  background-color: white;
  font-weight: bold;
}

.rTableHead {
  background-color: white;
  border: 1px solid #999999;
  float: left;
  height: 17px;
  overflow: hidden;
  padding: 3px 1.8%;
  width: 36%;
}

.rTable:after {
  display: table-cell;
  visibility: hidden;
  display: block;
  font-size: 0;
  content: " ";
  clear: both;
  height: 0;
}

.rTableHeads {
  background-color: white;
  border: 1px solid #999999;
  float: left;
  height: 20px;
  padding: 3px 1.8%;
  width: 55%;
}

.rTableCell {
  background-color: white;
  border: 1px solid #999999;
  float: left;
  height: 17px;
  overflow: hidden;
  padding: 3px 1.8%;
  width: 15%;
}

.rTableCells {
  background-color: white;
  border: 1px solid #999999;
  float: left;
  height: 60px;
  overflow: hidden;
  padding: 3px 1.8%;
  width: 15%;
}

.rTableHea {
  background-color: white;
  border: 1px solid #999999;
  float: left;
  height: 60px;
  overflow: hidden;
  padding: 3px 1.8%;
  width: 36%;
}

.rTables {
  background-color: white;
  border: 1px solid #999999;
  float: left;
  height: 50px;
  overflow: hidden;
  padding: 3px 1.8%;
  width: 15%;
}
<!DOCTYPE html>
<html>

<head>
  <title>hey contact </title>
</head>

<body>
  <p style="text-align: center">
    <a href="index.html">index</a>
    <a href="about.html">about</a>
    <a href="media.html">media</a>
    <a href="contact.html">contact</a>
  </p>
  <div class="rTable">
    <div class="rTableRow">
      <form>
        <div class="rTableHeads" align="center"><strong>Contact me</strong></div>

    </div>
    <div class="rTableRow">
      <div class="rTableCell"> <label for="Name">Name:</label></div>
      <!--label 
   is to lable name -->
      <div class="rTableHead">&nbsp;
        <input type="Name" class="form-control" id="name" placeholder="Enter 
      name" name="name">
      </div>
      <!--placeholder let the enter name comment come out -->
    </div>
    <div class="rTableRow">
      <div class="rTableCell"><label for="Email">Email_address:</label>
      </div>
      <div class="rTableHead">&nbsp;
        <input type="email" class="form-control" id="email" placeholder="Enter 
 email" email="email">
      </div>
    </div>
    <div class="rTableRow">
      <div class="rTableCell">Subject :
      </div>
      <div class="rTableHead">&nbsp; <select name="subject">
<option value="webt">Web Design</option>
 <option value="programming">programming</option>
<option value="data">Data management</option>
<option value="math">Math</option>
 <option value="MPU">MPU</option>
 </select>
      </div>
    </div>
    <div class="rTableRow">
      <div class="rTableCells">Message :
      </div>
      <div class="rTableHea">&nbsp;
        <textarea name="comment" rows="5" cols="30">
    </textarea>
      </div>
    </div>
    <div class="rTables" align="center"> </div>
    <div class="custom-row"></div>
    <!--<div class="rTableHeads" align="center"><strong>Contact me</strong>
  </div> -->
    </form>
  </div>
</body>

</html>

I have encountered an issue while trying to add another row below the message section in my HTML code. It seems that the new row is not being displayed as expected. Can someone provide assistance with resolving this problem?

Here is a link to see the output: https://i.sstatic.net/SMv0O.png

I am unsure why I am unable to create a new row below the message section and it appears next to it instead. Could anyone offer insight into why I am facing difficulties in adding a row under the message section?

Answer №1

Ensure that the .rTables class has clear:both; added to it.

Solution 2:

To solve this issue, nest the rTables class within the rTableRow div as shown below:

<div class="rTableRow">
  <div class="rTables" align="center">  </div>
</div>

If you are creating a table, consider using the HTML table structure for better organization and layout.

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

What is causing my inline JSX styling to override my media query?

After exhausting all my options and searching high and low for a solution, I am completely stuck. Despite trying various methods like importing media queries from a separate file and using ancestors to target elements, I still cannot get this to work. The ...

Adjust the appearance of input fields that exclusively have the value "1"

When designing my website, I encountered a problem with the style I chose where the number "1" looks like a large "I" or a small "L." I am wondering if there is a way to use JavaScript to dynamically change the font style for input fields that only contai ...

Enhancing functionality with jQuery: updating multiple input fields at

Currently, I am attempting to utilize jQuery to modify some HTML text by adjusting a slider. I have managed to accomplish this; however, I also need it to happen only if a checkbox is checked. How can I integrate both conditions and ensure that the text ch ...

If the option of "none" is chosen, I would like to deactivate all checkbox selections

Struggling with disabling all checkboxes in a PHP form when the NONE option is selected. <h5>HEALTH OF STUDENT</h5> <p>Any physical, emotional, or other difficulties to be aware of?</p> <table> <td>Hearing ...

Incorporate JSON data to display SVG images

As a beginner in web development, I have been honing my skills with the AngularJS framework due to its user-friendly nature. Currently, I'm working on pulling JSON data from an API using $http.get method. One of the fields contains an image source i ...

Creating consistent image placement across all divs: a step-by-step guide

html { font-family: 'Open Sans', sans-serif; } body {margin: 0; padding: 0; } #wrapper { padding-left:50px; padding-top:30px; } #third, fifth { background-color:#E8E8E8 ; } img[src^="my_menu.png"] { z-index:10; } #s ...

Submitting a form from outside the form using a button in HTML: A step-by-step guide

I'm looking to submit a form using Angular on the functions next() and saveStep(). I'm unable to place next() and saveStep() within the form itself. I have set up my ng-click for next() and saveStep() below the form. When I submit the form fro ...

Values do not appear as expected post PDF conversion using wkhtmltopdf

Currently, I am updating certain values within my HTML page by following this process: The function: function modifyContent(){ var newTitle = document.getElementById('myTextField1').value; if( newTitle.length==0 ){ alert('Plea ...

Continuous refreshing of window during Ajax and PHP form submission

Appreciation to those who took the time to read this post! I have a contact form on my website and I am facing an issue where the window keeps refreshing after submission, despite using Ajax with a POST method. Below is the HTML code: <form class="fo ...

`Implementing a dynamic list with image and button using Bootstrap 5`

I've been exploring ways to create a container with 4 images aligned next to each other, accompanied by a button beneath each image. My goal is for the layout to be responsive, meaning that as the screen size adjusts, the elements inside should also a ...

Using .htaccess to Conceal Directories with Documents

It seems that my website is being targeted by individuals seeking to obtain all the code. I have implemented an .htaccess file that will display nothing when someone visits domain.com/images, but if they specifically request domain.com/images/logo.png, the ...

The image referenced in the assets folder could not be located within the SCSS

Although I've come across similar questions, none of the solutions provided seem to work for me. I've tried them all, but they just don't seem to do the trick. My goal is quite simple - I just want to set a background image using CSS. Howev ...

Troubles with Sizing in Twitter Bootstrap Modal

One issue I have encountered with my application is the varying widths of modals. Setting the width inline works well, but when the window is compressed it can cause part of the modal to be off screen, rendering it useless at smaller resolutions such as th ...

The alignment of Material-UI Button and ButtonGroup is not consistent

I'm puzzled as to why the Button and ButtonGroup elements are not aligned on the baseline in the code snippet provided. Is there a specific property that can be adjusted on the ButtonGroup element to achieve alignment? <!DOCTYPE html> <htm ...

When scrolling, dynamically change the background color by adding a class

I am looking to achieve a scroll effect where the color of the menu buttons changes. Perhaps by adding a class when scrolling and hitting the element? Each menu button and corresponding div has a unique ID. Can anyone suggest what JavaScript code I should ...

php$json_data = json_decode($response);

I am brand new to PHP coming from a background in Python. I was fairly comfortable with retrieving JSON results from websites in Python, but for some reason, I can't seem to get it working in PHP. Here is the code snippet I'm using: <?php $ ...

Having trouble submitting a date input form generated with vuejs on Safari browser

I am a huge fan of Vuejs and it's my go-to at work. The other day, I came across a rather perplexing scenario. If you have any insights into this, please do share. Here is the code in question: <script setup lang="ts"> import { ref ...

Leveraging Javascript/Jquery for numbering items in a list

This is a snippet of HTML code that I am working with: <ul> <li data-slide-to="0" data-target="#myCarousel" class="appendLi"></li> <li data-slide-to="0" data-target="#myCarousel" class="appendLi"></li> <li data ...

I'm wondering why my second div is displaying a different size compared to the rest, even though they all share the same container-fluid class

Within the HTML snippet provided, utilizing Bootstrap, all three child divs possess the container-fluid class. However, why does the 2nd div differ from the others? Refer to this example Div Example. Div1 and div4 exhibit the same characteristics, as do d ...

Issue with styling Icon Menu in material-ui

I'm having trouble styling the Icon Menu, even when I try using listStyle or menuStyle. I simply need to adjust the position like this: https://i.sstatic.net/n9l99.png It currently looks like this: https://i.sstatic.net/WeO1J.png Update: Here&apo ...