Jump to content

Simple Tables


firstplacedave

Recommended Posts

Hello fellow coders! I'm working on the emplementation of a new Electronic Health Record for a Behavioral Health Organization and we're trying to figure out the best way to add grids to certain forms. I've gotten a pretty good base down, but I have a few things i require assistance with. Below is one example of what we wanted. My questions are:

 

1. How can I make the individual cells smaller or larger? A few will require a bit more room but not much.

2. Also attached is another example of what we need. I need it to list from 1-4 and leave room for typing. I would love to have the cell end like they do in the table above, however whatever I try it doesn't work. If I leave it as is, when the user starts typing their text is bolded. Is there a way to fix this?

 

Attached are the two table photos and the code is below. Thank you for any help.

<!-- Table 1 Code: -->

<table border=1 style=width:100%>
<tr>
<td><b><u>Specific Target Behavior 1:</b></u></td>
<td><b><u>Frequency (times per____):</b></u></td>
<td><b><u>Intensity:</b></u></td>
<td><b><u>Duration (min):</b></u></td>
<td><b><u>Change (since last evaluation, in +/- % change):</b></u></td>
</tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><b><u>Specific Target Behavior 2:</b></u></td>
<td><b><u>Frequency (times per____):</b></u></td>
<td><b><u>Intensity:</b></u></td>
<td><b><u>Duration (min):</b></u></td>
<td><b><u>Change (since last evaluation, in +/- % change):</b></u></td>
</td></tr><td></td><td></td><td></td><td></td>
<td></td>
</tr>
<td><b><u>Specific Target Behavior 3:</b></u></td>
<td><b><u>Frequency (times per____):</b></u></td>
<td><b><u>Intensity:</b></u></td>
<td><b><u>Duration (min):</b></u></td>
<td><b><u>Change (since last evaluation, in +/- % change):</b></u></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><b><u>Specific Target Behavior 4:</b></u></td>
<td><b><u>Frequency (times per____):</b></u></td>
<td><b><u>Intensity:</b></u></td>
<td><b><u>Duration (min):</b></u></td>
<td><b><u>Change (since last evaluation, in +/- % change):</b></u></td>
</tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<table>


<!-- Table 2 Code: -->

<table border=1 style=width:100%>
<tr>
<td><b>#1:</b></tr>
<table>

The ' is required to make the code run in the database.

post-191619-0-24565600-1448468153_thumb.png

post-191619-0-03996000-1448468154_thumb.png

Link to comment
Share on other sites

All you have to do to adjust cell size is manipulate the <td width="???"%>(replace ? with a number) Work your way across until you have reached 100%. Thing you will have to watch is if you get into another row with different cell sizes be sure to use <td wdth="00%"colspan="2"> , that is, however many columns it crosses borders, like, if you had

 

<tr><td width="100%" colspan="3"></td></tr>

<tr><td width="50%"></td><td width="20%"></td><td width="30%"></td></tr>

 

If you're populating the cells from a database, tables are great but for design, remember that search engines don't get along with them to great.

Also, I don't understand your use of needing the ' to run in a data base.

  • Like 1
Link to comment
Share on other sites

I'm sorry, maybe I didn't clarify fully. Those " ' " are requred at the beginning and end of the code for executing. This won't be populating from anywhere. I simply want these to be editable, which they are now. I appreaciate your help so, so much. I'll be trying this when I return to the office on Monday. I hope you and your family have a wonderful Thanksgiving.

Link to comment
Share on other sites

All you have to do to adjust cell size is manipulate the <td width="???"%>(replace ? with a number) Work your way across until you have reached 100%. Thing you will have to watch is if you get into another row with different cell sizes be sure to use <td wdth="00%"colspan="2"> , that is, however many columns it crosses borders, like, if you had

 

<tr><td width="100%" colspan="3"></td></tr>

<tr><td width="50%"></td><td width="20%"></td><td width="30%"></td></tr>

 

If you're populating the cells from a database, tables are great but for design, remember that search engines don't get along with them to great.

Also, I don't understand your use of needing the ' to run in a data base.

You're solutiuon has solved almost ALL of my problems. I am most thankful. The columns now have a fixed width that I've set based on your direction now I just have one more question I hope you (or anyone else) can answer, how on EARTH do I STOP them from expanding at all. I only want the user to be able to type until the end of the cells. I've found something that solves my problem with the whole table shiftting to display the text better, but I need something that locks the cell from expanding. Here is my current code and the output is below in an attached screenshot.

 

'<table border=1 width=100% style=table-layout:fixed ><overflow:hidden><tr><td width=35%><b><u>Specific Target Behavior 1:</b></u></td><td width=15%><b><u>Frequency (times per____):</b></u></td><td width=20%><b><u>Intensity:</b></u></td><td width=10%><b><u>Duration (min):</b></u></td><td width=20%><b><u>Change (since last evaluation):</b></u></td></tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td><b><u>Specific Target Behavior 2:</b></u></td><td><b><u>Frequency (times per____):</b></u></td><td><b><u>Intensity:</b></u></td><td><b><u>Duration (min):</b></u></td><td><b><u>Change (since last evaluation, in +/- % change):</b></u></td></td></tr><td></td><td></td><td></td><td></td><td></td></tr><td><b><u>Specific Target Behavior 3:</b></u></td><td><b><u>Frequency (times per____):</b></u></td><td><b><u>Intensity:</b></u></td><td><b><u>Duration (min):</b></u></td><td><b><u>Change (since last evaluation, in +/- % change):</b></u></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td><b><u>Specific Target Behavior 4:</b></u></td><td><b><u>Frequency (times per____):</b></u></td><td><b><u>Intensity:</b></u></td><td><b><u>Duration (min):</b></u></td><td><b><u>Change (since last evaluation, in +/- % change):</b></u></td></tr><td></td><td></td><td></td><td></td><td></td></tr><table>'

 

 

Your code is full of errors. Did you familiarize yourself with the tutorial?

 

http://www.w3schools.com/html/html_tables.asp

I am aware, and I have viewed that page before, thank you. I cannot quite explain why the software we use allows for it to display with these errors, but it does.

post-191619-0-53949700-1448916262_thumb.png

Edited by firstplacedave
Link to comment
Share on other sites

It depends on what you're processing it with, but you can put a limit as to how much text (how many characters) a person can enter. Inside a table it will always start a new row when you reach the end of one. In a table your text is usually vertically aligned to the center by default so you need to set everything to align to the top of the cells to keep things looking neat. CSS is the way to go for that one. Another thing you might want to remember when using tables is that search engines don't like to search them which is why everybody uses CSS layouts.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...