I am trying to make an HTML page which has a table center aligned.
Now I want to have a border to the entire page but on the center.
table {
min-width: 900px;
}
html,
body {
height: 100%;
min-width: 900px;
margin: 0;
padding: 0;
}
body {
background: white;
border-style: double;
}
<table class="table" align="center">
<tr>
<td colspan="2"> <img src="logo.png" class="logo" /> </td>
<td colspan="2" align="right">
<h3>Heading</h3>
</td>
</tr>
<tr>
<td colspan="4">
<hr>
</td>
</tr>
<tr>
<td> <input type="number" class="input"> </td>
<td> <input type="text" class="input"> </td>
<td> <input type="text" class="input"> </td>
<td> <input type="text" class="input"> </td>
</tr>
<tr>
<td>Student ID Number</td>
<td>Last Name</td>
<td>First Name</td>
<td>Middle Name</td>
</tr>
</table>
I am looking for something like this. http://ibb.co/gyqTY6
My content is displayed in the entire page and I like to have a border to the center of the entire page.
The above styling gives me border on the entire page but I want to have a border on the center of the entire page.
It is not quite clear what you want, but perhaps applying a border only to the table is what you meant.
In that case, style the table accordingly.
Edit: especially, avoid applying border to the body, this won't get you the desired result.
Minimal suggestion:
table {
min-width: 900px;
border: 1px solid #000;
}
html,
body {
height: 100%;
min-width: 900px;
margin: 0;
padding: 0;
}
<table class="table" align="center">
<tr>
<td colspan="2"> <img src="logo.png" class="logo" /> </td>
<td colspan="2" align="right">
<h3>Heading</h3>
</td>
</tr>
<tr>
<td colspan="4">
<hr>
</td>
</tr>
<tr>
<td> <input type="number" class="input"> </td>
<td> <input type="text" class="input"> </td>
<td> <input type="text" class="input"> </td>
<td> <input type="text" class="input"> </td>
</tr>
<tr>
<td>Student ID Number</td>
<td>Last Name</td>
<td>First Name</td>
<td>Middle Name</td>
</tr>
</table>
Tables should not be used for layout. They cause the rendering of the page to be slowed down and are not semantically correct. They should only be used to render tabular data.
Also, don't use h1, h2, etc. because of the way they make the text look, use them because they are the logical start of a new section of a particular importance. Any text can be styled to look like any other text.
So, the above two points really are talking about "semantics". The HTML tags you use should describe the data they convey, not the look of the data on the page. This allows for the data to be consumed anywhere, by any device and that device should understand what the data is. CSS is meant to make that data look how you'd like it to look. Don't confuse the two.
Now, you can "style" content to be displayed as a table using the CSS display property, which allows you to avoid using the <table> element and the related elements as well. But, your layout looks like simple columns, so you could approach this in a number of ways, but here's one:
html, body {
margin:0;
padding:0;
}
body {
background: white;
border: double;
}
.header h1 {
font-size:1.3em;
}
.wrapper {
border: 1px double black;
margin:25% 5px; /* Adding the same margin to top and bottom creates vertical alignment */
padding:10px;
}
.column {
display:inline-block;
}
<!-- By placing everything in a wrapper element, you can move it and style it easily -->
<div class="wrapper">
<div class="header">
<img src="logo.png" class="logo">
<h1>Heading</h1>
</div>
<div>
<hr>
</div>
<div class="column">
<input type="number" class="input"><br>
<span>Student ID Number</span>
</div>
<div class="column">
<input type="text" class="input"><br>
<span>Last Name</span>
</div>
<div class="column">
<input type="text" class="input"><br>
<span>First Name</span>
</div>
<div class="column">
<input type="text" class="input"><br>
<span>Middle Name</span>
</div>
</div>
Are you looking for something like this
.container{
border: 1px solid;
margin: 3%;
padding: 3%;
margin-right: 18%;
margin-left: 18%;
}
table{
margin:0 auto;
}
table th{
min-width:20%;
}
body{
background:red;
}
<div class="container">
<h2>Basic Table</h2>
<p>The .table class adds basic styling (light padding and only horizontal dividers) to a table:</p>
<table class="table" border="1">
<thead>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<tr>
<td>John</td>
<td>Doe</td>
<td>john#example.com</td>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
<td>john#example.com</td>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
<td>john#example.com</td>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
<td>john#example.com</td>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
<td>john#example.com</td>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
<td>john#example.com</td>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
<td>john#example.com</td>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
<td>john#example.com</td>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
<td>john#example.com</td>
</tr>
<tr>
<td>Mary</td>
<td>Moe</td>
<td>mary#example.com</td>
</tr>
<tr>
<td>July</td>
<td>Dooley</td>
<td>july#example.com</td>
</tr>
</tbody>
</table>
</div>
Related
I have table indentations controlled by padding. I set class="indent-(number_inches)" to choose indentation level. I am running into an issue where the <th> tags always indent based on the indent-18 class instead of the assigned class.
Whenever I remove the .indent-18 class from my CSS it takes on the properties of .indent-12 class instead.
Replacing th with th:first-child in css does not work
I am also open to any other, non-related critique on my code. I am still learning so teaching me the proper way would help a lot
/* TABLE CLASSES*/
.units {
text-align: left;
}
.table-header {
font-size: 20px;
text-align: center;
border-bottom: 2px solid black;
}
.big-header {
font-size: 16px;
}
.small-header {
font-size: 16px;
}
/*
Nest table based on these values
Indent 0" 6" 12" or 18", based off of excel indentations
*/
.indent-0 td:first-child,
th {
padding: 10px;
padding-left: 10px;
}
.indent-6 td:first-child,
th {
padding: 10px;
padding-left: 3%;
}
.indent-12 td:first-child,
th {
padding: 10px;
padding-left: 6%;
}
.indent-18 td:first-child,
th {
padding: 10px;
padding-left: 9%;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
<!-- USER FORM STARTS-->
<form action="/update_car_data/" method="post">
<div class="row">
<!-- TABLE 1 -->
<div class="col-md-6 col-sm-12 col-xs-12">
<table>
<thead>
<th class="table-header" colspan="3">Model Inputs, Internal Combustion Engine</th>
</thead>
<!--
Structure of table row:
Title | value | units
-->
<tr class="indent-0">
<td>Vehicle Life</td>
<td><input name="G18_Car" value="{{data['G18_Car']}}"></td>
<td class="units">Years</td>
</tr>
<tr class="indent-0">
<td>Distance Traveled Per Year After Purchase</td>
<td><input name="G19_Car" value="{{data['G19_Car']}}"></td>
<td class="units">Miles</td>
</tr>
<!--Generation, Assembly, and Delivery-->
<th class="big-header indent-0">Manufacture, Assembly, and Delivery</th>
<tr class="indent-6">
<td>Manufacture Assembly - GHG Emissions</td>
<td><input name="G22_Car" value="{{data['G22_Car']}}"></td>
<td class="units">MT CO2e</td>
</tr>
<tr class="indent-6">
<td>Delivery - GHG Emissions</td>
<td><input name="G23_Car" value="{{data['G23_Car']}}"></td>
<td class="units">MT CO2e</td>
</tr>
<!--Operation and Disposal-->
<tr>
<th class="big-header indent-0">Operation and Disposal</th>
</tr>
<!--Tailpipe emissions-->
<tr>
<th class="small-header indent-6">Tailpipe Emissions</th>
</tr>
<tr class="indent-12">
<td>Emissions Per Gallon of Gasoline</td>
<td><input name="G28_Car" value="{{data['G28_Car']}}"></td>
<td class="units">kg CO2e/gal</td>
</tr>
<tr class="indent-12">
<td>Fuel Efficiency</td>
<td><input name="G29_Car" value="{{data['G29_Car']}}"></td>
<td class="units">Miles/gal</td>
</tr>
<!--Fuel Cycle-->
<tr>
<th class="small-header indent-6">Fuel Cycle</th>
</tr>
<tr>
<th class="small-header indent-12">Ethanol Fuel Cycle</th>
</tr>
<tr class="indent-18">
<td>Volume % of Ethanol</td>
<td><input name="G23_Car" value="{{data['G32_Car']}}"></td>
<td class="units">%</td>
</tr>
<tr class="indent-18">
<td>Ethanol Fuel Cycle Basis</td>
<td><input name="G44_Car" value="{{data['G44_Car']}}"></td>
<td class="units">kg CO2e/gal</td>
</tr>
<tr>
<th class="small-header indent-12">Petroleum (Gasoline) Fuel Cycle</th>
</tr>
<tr class="indent-18">
<td>Upstream (Well to Refining Emissions)</td>
<td><input name="G33_Car" value="{{data['G33_Car']}}"></td>
<td class="units">MT CO2e/BBL-crude</td>
</tr>
<!--Refining-->
<tr>
<th class="small-header indent-18">Refining</th>
</tr>
<tr class="indent-18">
<td>Processing (Volumetric) Gain</td>
<td><input name="G36_Car" value="{{data['G36_Car']}}"></td>
<td class="units">%</td>
</tr>
<tr class="indent-18">
<td>Refining GHG Emissions Basis</td>
<td><input name="G37_Car" value="{{data['G37_Car']}}"></td>
<td class="units">MT CO2e/BBL-crude</td>
</tr>
<!--Distrubition (Refining to sales)-->
<tr>
<th class="small-header indent-12">Distrubition (Refining to Sales)</th>
</tr>
<tr class="child-row indent-18">
<td>Evaporative Loss</td>
<td><input name="G40_Car" value="{{data['G40_Car']}}"></td>
<td class="units">%</td>
</tr>
<tr class="indent-18">
<td>Carbon Intensity (GWP 100) of Motor Gasoline</td>
<td><input name="G41_Car" value="{{data['G41_Car']}}"></td>
<td class="units">MT CO2e/MT</td>
</tr>
<tr class="indent-18">
<td>Tank-Truck Shipment to Sales Centers</td>
<td><input name="G42_Car" value="{{data['G42_Car']}}"></td>
<td class="units">MT CO2e/year</td>
</tr>
<tr class="indent-0">
<td>Disposal -GHG Emissions</td>
<td><input name="G46_Car" value="{{data['G46_Car']}}"></td>
<td class="units">MT CO2e</td>
</tr>
</table>
</div>
<!-- TABLE 2 -->
<div class="col-md-6 col-sm-12 col-xs-12">
<table>
<tr>
<th class="table-header" colspan="3">Model Inputs, EV (Electric Vehicle)</th>
</tr>
<tr class="child-row">
<td>Vehicle Life</td>
<td><input name="G18_Car" value="{{data['G18_Car']}}"></td>
<td>Years</td>
</tr>
<tr class="child-row">
<td>Delivery -GHG emissions</td>
<td><input name="G19_Car" value="{{data['G19_Car']}}"></td>
<td>Miles</td>
</tr>
</table>
</div>
<br>
<div class="col-12">
<button name="updateBtn" type="submit">Update</button>
</div>
</div>
</form>
You should change the CSS like this :
.indent-0 td:first-child, th.indent-0 {
padding: 10px;
padding-left: 10px;
}
.indent-6 td:first-child, th.indent-6 {
padding: 10px;
padding-left: 3%;
}
.indent-12 td:first-child, th.indent-12 {
padding: 10px;
padding-left: 6%;
}
.indent-18 td:first-child, th.indent-18 {
padding: 10px;
padding-left: 9%;
}
Fiddle
I am writing my final project at PHP and JS. I need help with the html and CSS styling.
This is my sign form, I want help in 2 things.
I want to do that the whole row (tr) that include th while be with border, now I know to do it only that every th have border.
I want to divide the table to sections and to style every section in other CSS code.
How can I do it?
This my HTML code:
<body>
<form>
<table id="t">
<tr>
<th>Basic info</th>
<th>Contact info</th>
<th>About me</th>
</tr>
<tr>
<td><input placeholder="First name"></td>
<td><input placeholder="Phone"></td>
<td rowspan="3"><textarea rows="8" placeholder="About me"></textarea></td>
</tr>
<tr>
<td><input placeholder="Last name"></td>
<td><input placeholder="Area"></td>
</tr>
<tr>
<td><input placeholder="Degree"></td>
<td><input placeholder="Email"></td>
</tr>
<tr><th colspan="2">Social networks</th></tr>
<tr>
<td><input row placeholder="Facebook link"></td>
<td><input row placeholder="Website link"></td>
</tr>
<tr>
<td><input row placeholder="Twitter link"></td>
<td><input row placeholder="Medium link"></td>
</tr>
<tr>
<td><input row placeholder="Instagram link"></td>
<td><input row placeholder="Google link"></td>
</tr>
<tr><td colspan="2"><button type="submit">שלח</button></td></tr>
</table>
</form>
</body>
This is my CSS:
table{
margin: 16px;
text-align: center;
}
td{
padding: 10px;
justify-content: space-between;
}
#t textarea{
width: 100%;
height: 100%;
}
tr>th{
margin-top: 10px;
border: 1px solid red;
}
For (1), tr's can only have borders when the table is border-collapse:collapse.
For (2), you can put rows in <thead>, <tbody>, <tfoot> sections and style those separately.
Maybe you can have multiple <tbody> sections and use nth-of-type to select them but I don't know.
Differences in the below
addition of thead, tbody, tfoot in the html
style tbody as an example
border-collapse:collapse on the table style
tr style on the first tr
table {
margin: 16px;
text-align: center;
border-collapse: collapse;
}
td {
padding: 10px;
justify-content: space-between;
}
#t textarea {
width: 100%;
height: 100%;
}
tbody {
font-style: italic;
}
<form>
<table id="t">
<thead>
<tr style="border:solid 1px">
<th>Basic info</th>
<th>Contact info</th>
<th>About me</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<input placeholder="First name">
</td>
<td>
<input placeholder="Phone">
</td>
<td rowspan="3">
<textarea rows="8" placeholder="About me"></textarea>
</td>
</tr>
<tr>
<td>
<input placeholder="Last name">
</td>
<td>
<input placeholder="Area">
</td>
</tr>
<tr>
<td>
<input placeholder="Degree">
</td>
<td>
<input placeholder="Email">
</td>
</tr>
<tr>
<th colspan="2">Social networks</th>
</tr>
<tr>
<td>
<input row placeholder="Facebook link">
</td>
<td>
<input row placeholder="Website link">
</td>
</tr>
<tr>
<td>
<input row placeholder="Twitter link">
</td>
<td>
<input row placeholder="Medium link">
</td>
</tr>
<tr>
<td>
<input row placeholder="Instagram link">
</td>
<td>
<input row placeholder="Google link">
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="2">
<button type="submit">שלח</button>
</td>
</tr>
</tfoot>
</table>
</form>
I'm trying to achieve this look for a table. I couldn't figure out how to space it like this. This is my code so far. How can i accomplish this?
<table class="table table-inverse" data-bind="foreach: todos">
<tr >
<td ><input type="checkbox" data-bind="checked: IsDone, click: $parent.updateTodo" /></td>
<td ><span data-bind="text: Description"></span></td>
<td ><small></small></td>
</tr>
</table>
Well you can check the following snippet, if you are looking for backward compatibility the following could be useful
.wrapper{padding:20px;background:blue;}
table tr td:last-child,table tr td:first-child{width:25px;}
table{width:100%;background:#fff;margin-bottom:5px}
table:last-child{margin-bottom:0;}
<div class="wrapper">
<table class="table table-inverse" data-bind="foreach: todos">
<tr>
<td>[#]</td>
<td><span data-bind="text: Description">Hello</span></td>
<td>[#]</td>
</tr>
</table>
<table class="table table-inverse" data-bind="foreach: todos">
<tr>
<td>[#]</td>
<td><span data-bind="text: Description">Hello</span></td>
<td>[#]</td>
</tr>
</table>
</div>
You can use flex-box to achieve this
body{
background:#3a9bcb;
}
table{
width:100%;
}
.flex-box {
display: flex;
margin-bottom: 5px;
padding: 10px;
background:#fff;
}
.col {
flex: 1 1;
}
.col:first-child,
.col:last-child {
flex: 0 0 30px;
}
<table>
<tr class=flex-box>
<td class=col>
<input type=checkbox>
</td>
<td class=col>
Placeholder text
</td>
<td class=col>
Trash
</td>
</tr>
<tr class=flex-box>
<td class=col>
<input type=checkbox>
</td>
<td class=col>
Placeholder text
</td>
<td class=col>
Trash
</td>
</tr>
</table>
I am trying to finish up my website design but I am having trouble displaying some divs and aligning them.
This is what I am trying to achieve:
This is what I am getting:
index.php
style.css
jsFiddle: http://jsfiddle.net/wMvL5/
content (the central div that contains the 'Latest Projects' and 'Latest News' divs:
<div class="content">
<div class="projects">
<h1>Latest Projects</h1>
<div class="current_projects" align="center">
<div class="projects_gallery" align="center">
<table align="center">
<tr align="center">
<td>
<div class="project_desc_1">Project Description 1</div>
<div class="project_desc_2">Project Description 2</div>
<div class="project_desc_3">Project Description 3</div>
</td>
</tr>
<tr align="center">
<td>
<div class="slide"><img src="./images/blivori.png"/ id="project1"></div>
<div class="slide"><img src="./images/blivori.png"/ id="project2"></div>
<div class="slide"><img src="./images/blivori.png"/ id="project3"></div>
</td>
</tr>
<tr>
<td>
<ol class='project_selector' align="center">
<li></li>
<li></li>
<li></li>
</ol></td>
</tr>
<tr align="center">
<td>
<label id="description1">Description 1</label>
<label id="description2">Description 2</label>
<label id="description3">Description 3</label>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="empty_div_two"></div>
<div class="news">
<h1>Latest News</h1>
<div class="news_post" align="center">
<table align="center">
<tr>
<td style="width: 5%">►</td>
<td style="width: 95%"><label class="newspost1">News 1</label></td>
</tr>
<tr>
<td>►</td>
<td><label class="newspost2">News 1</label></td>
</tr>
<tr>
<td>►</td>
<td><label class="newspost3">News 2</label></td>
</tr>
<tr>
<td>►</td>
<td><label class="newspost4">News 3</label></td>
</tr>
<tr>
<td>►</td>
<td><label class="newspost5">News 4</label></td>
</tr>
<tr>
<td>►</td>
<td><label class="newspost6">News 5</label></td>
</tr>
<tr>
<td>►</td>
<td><label class="newspost7">News 6</label></td>
</tr>
<tr>
<td>►</td>
<td><label class="newspost8">News 7</label></td>
</tr>
<tr>
<td>►</td>
<td><label class="newspost9">News 8</label></td>
</tr>
<tr>
<td>►</td>
<td><label class="newspost10">News 9</label></td>
</tr>
<tr>
<td>►</td>
<td><label class="newspost10">News 10</label></td>
</tr>
</table>
</div>
</div>
Mostly I am having trouble of displaying two divs (empty_div_two) which is found between 'Latest Projects' and 'Latest News' (the seperator) and '.misc' which is being displayed at all. I am also trying to put the 'Latest News' at the top right of the div. Also, the border-radius for the header doesn't seem to work.
For border-radius on your header, Apply it to your .header-container instead of header.
.header-container {
border-top-left-radius: 30px;
border-top-right-radius: 30px;
}
And to fix other things, do the following: SEE THE DEMO
.empty_div_two {
background: #fff;
}
.projects {
float: left;
width: 60%;
}
.news {
width: 30%;
}
.current_projects // remove width: 49%;
.content // remove width: 1184px;
I have a table that I broke out to two tables because I need to have the scrolling functionality only span the top table. The bottom table is a textarea box. What I need to do is make the bottom table blend right into the top table to looks as if its all 1 table while maintaining 2 tables. Maybe by modifying the borders?
<form id="commentForm" name="commentForm" action="" method="post">
<ctl:vertScroll height="300" headerStyleClass="data_table_scroll" bodyStyleClass="data_table_scroll" enabled="${user.scrollTables}">
<ctl:sortableTblHdrSetup topTotal="false" href="show.whatif_edit_entry?entryId=${entry.entryId}"/>
<table class="data_table vert_scroll_table" style="width:360px;">
<tr>
<th style="text-align: center;">User</th>
<th style="text-align: center;">Date</th>
<th style="text-align: center;">Comments</th>
</tr>
<c:forEach var="comments" items="${entry.comments}">
<tr id="id${comments.id}">
<c:choose>
<c:when test="${comments.auditable != null}">
<td>
${comments.auditable.createdBy.lastName}, ${comments.auditable.createdBy.firstName}
</td>
<td title="<fmt:formatDate value="${comments.auditable.createdDate}" pattern="${date_time_pattern}" />"><span class="mouseover_text"><fmt:formatDate value="${comments.auditable.createdDate}" pattern="${date_time_pattern}" /></span>
</td>
</c:when>
<c:otherwise>
<td colspan="1">${lastName}, ${firstName}</td>
<td title ="${comments.date}"><span class="mouseover_text">${comments.date} </span></td>
</c:otherwise>
</c:choose>
<td id="comments-${comments.id}" style="width:400px;"><pre style="width: auto;">${comments.comment}</pre></td>
</c:forEach>
</tr>
<tr id="commentRow">
</tr>
</table>
</ctl:vertScroll>
<c:if test="${lock.locked || form.entryId < 0 }">
<%-- This is the row for adding a new comment. --%>
<table class="data_table vert_scroll_table" style="width:360px;">
<td colspan="3">
You have <strong><span id="commentsCounter">${const['COMMENT_MAX_LENGTH'] - fn:length(commentForm.comment)}</span></strong> characters left.<br/>
<textarea id="comment" name="comment" rows="2" cols="125" style="width:400px;"
onfocus="characterCounter('commentsCounter',${const['COMMENT_MAX_LENGTH']}, this)"
onkeydown="characterCounter('commentsCounter',${const['COMMENT_MAX_LENGTH']}, this)"
onkeyup="characterCounter('commentsCounter',${const['COMMENT_MAX_LENGTH']}, this)" ></textarea>
<img src="../images/icon_add.gif" border="0" alt="Add"/>
</td>
</c:if>
</table>
Try rethinking your markup. This would be much more suited:
<table>
<thead>
<tr>
<th>User</th>
<th>Date</th>
<th>Comments</th>
</tr>
</thead>
<tbody>
...
</tbody>
<tfoot>
<tr>
<td colspan="2"></td>
<td>
<textarea>...</textarea>
</td>
</tr>
</tfoot>
</table>
Since your code has some weird stuff in it <c:forEach var="comments" items="${entry.comments}">, I'm not gonna mess with it. But I will give the the answer in a nutshell. Disclaimer: This is how, I would do this, but probably there are better ways of doing things. Also, I'm using dotted borders for the demo.
(1) Get the width's under control
Lets make a global wrapper with set width.
<div style="width: 600px; margin: 0px auto; border: 1px dotted blue;">
miley rocks!
</div>
(2) Lets make an example table
We are now making an example table with some random list. Also lets width: 100%; to the table, so it will match the global wrapper's width.
<table style="width: 100%; border: 1px dotted green;">
<tr>
<th>Name</th>
<th>Hotness level</th>
</tr>
<tr>
<td>Miley</td>
<td>10</td>
</tr>
<tr>
<td>Selena</td>
<td>9</td>
</tr>
<tr>
<td>You</td>
<td>-3</td>
</tr>
</table>
(3) Now the second table
Lets add the form table or aka. the second table..
<table style="width: 100%; border: 1px dotted blue;">
<tr>
<td>
<textarea name="my_textarea"></textarea>
</td>
</tr>
</table>
Or why use <table>?
<div style="width: 100%; border: 1px dotted blue;">
<textarea name="my_textarea"></textarea>
</div>
(4) And now everything together
All tables and containers together. This should result two containers with the same width.
<div style="width: 600px; margin: 0px auto; border: 1px dotted blue;">
<table style="width: 100%; border: 1px dotted green;">
<tr>
<th>Name</th>
<th>Hotness leve</th>
</tr>
<tr>
<td>Miley</td>
<td>10</td>
</tr>
<tr>
<td>Selena</td>
<td>9</td>
</tr>
<tr>
<td>You</td>
<td>-3</td>
</tr>
</table>
<div style="width: 100%; border: 1px dotted blue;">
<textarea name="my_textarea"></textarea>
</div>
</div>
Not sure how much this helps. But this is the general idea for that type of problem :)