Solved

Tables - how can I put things NEXT to it

Posted on 2001-08-01
7
193 Views
Last Modified: 2010-04-09
I have a table
<TABLE -stuff here>
  <TR>
     <TD>item1</TD>
     <TD>item2</TD>
  </TR>
  <TR>
     <TD>item3</TD>
     <TD>item4</TD>
  </TR>
</TABLE>

would produce something like
item1 item2
item3 item4

well I would like to put a button next to the table

item1 item2 (button)
item3 item4 (button2)

I've searched through the entire MSDN library and can not find any attribute to allow me to do this =(  unless I missed it.

Please clue me in as to how =)

~Ixeus
0
Comment
Question by:The_Brain
7 Comments
 
LVL 6

Expert Comment

by:andreif
ID: 6339943
add more cells:

<TABLE>
 <TR>
    <TD>item1</TD>
    <TD>item2</TD>
    <TD>button1</TD>
 </TR>
 <TR>
    <TD>item3</TD>
    <TD>item4</TD>
    <TD>button2</TD>
 </TR>
</TABLE>


to display button you can use form:

<form>
<input type=button value="Caption here">
</form>
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6339944
You can create another column or it

<TABLE -stuff here>
 <TR>
    <TD>item1</TD>
    <TD>item2</TD>
    <TD><input type="button" value="Button 1"></TD>
 </TR>
 <TR>
    <TD>item3</TD>
    <TD>item4</TD>
    <TD><input type="button" value="Button 2"></TD>
 </TR>
</TABLE>


Or

You can use white spaces to do it
<TABLE -stuff here>
 <TR>
    <TD>item1</TD>
    <TD>item2&nbsp;<input type="button" value="Button 1"></TD>
 </TR>
 <TR>
    <TD>item3</TD>
    <TD>item4&nbsp;<input type="button" value="Button 2"></TD>
 </TR>
</TABLE>


I would recommend the first method.


hongjun
0
 
LVL 1

Author Comment

by:The_Brain
ID: 6339967
ok sorry, but I got a border on my table

so it's actually

|--------------
|item1 | item2 | [button]
|item3 | item4 | [button2]
---------------

Sorry @.@

I already tried those solutions before :(

~Ixeus
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 15

Accepted Solution

by:
a.marsh earned 50 total points
ID: 6340000
The most obvious choice I can see in this case is to use nested tables e.g.:

<TABLE BORDER="0">
<TR><TD><TABLE BORDER="1">
 <TR>
    <TD>item1</TD>
    <TD>item2</TD>
 </TR>
 <TR>
    <TD>item3</TD>
    <TD>item4</TD>
 </TR>
</TABLE></TD>
<TD><TABLE BORDER="0">
 <TR>
    <TD>[button]</TD>
 </TR>
 <TR>
    <TD>[button]</TD>
 </TR>
</TABLE></TD>
</TR>
</TABLE>

That's just one way of nesting them - you may have to do it differently or adjust cellspacing and cellpadding on each table in order to ensure everything looks lined up - but that will really depend on the data you have in the table.

What you may also need to do to ensure that each row is the same height is to use a transparent gif to force the browser to set a particular height - don't try using the height attribute in the table itself if you need this to work in Netscape!


:o)

Ant
0
 
LVL 1

Author Comment

by:The_Brain
ID: 6340186
You are the man :)

I thought that might be the solution... but dang it's so ugly...  but looks SO complex @.@ mmmmmmmmmmmmm could impress my boss maybe *grin*

You should see this table you want me to embed... I just used a pretty pathetic example X_X

~Ixeus

thx again... I'll accept your answer once I get this to work :)

(in mean time, here's what I'm trying to merge)



<FORM NAME="QUERYFORM" METHOD="POST" ACTION="SaveEdit.asp">
            <FONT FACE="ARIAL" SIZE="5">
                  <!--<B>VIEW LOGS</B>-->
                  <IMG src="Headings/ViewEdit.gif">
                  <INPUT TYPE="BUTTON" NAME="FIRSTRECORD" VALUE = "<<"
                  <%
                        if (BlurPrevious=true) then
                              response.write " disabled"
                        end if
                  %>></INPUT>
                  <INPUT TYPE="BUTTON" NAME="PREVIOUSRECORD" VALUE = "<-"
                  <%
                        if (BlurPrevious=true) then
                              response.write " disabled"
                        end if
                  %>></INPUT>
                  <INPUT TYPE="BUTTON" NAME="NEXTRECORD" VALUE = "->"
                  <%
                        if (BlurNext=true) then
                              response.write " disabled"
                        end if
                  %>></INPUT>
                  <INPUT TYPE="BUTTON" NAME="LASTRECORD" VALUE = ">>"
                  <%
                        if (BlurNext=true) then
                              response.write " disabled"
                        end if
                  %>></INPUT><BR>
                  <INPUT TYPE="BUTTON" NAME="EDITDATA" VALUE = "Edit data"></INPUT>
                  <INPUT TYPE="SUBMIT" NAME="SAVECHANGES" VALUE = "Save changes" disabled></INPUT>
                  <INPUT TYPE="RESET" NAME="CANCELCHANGES" VALUE = "Cancel changes" disabled></INPUT>                  
                  <FONT Size="3">Record <%=AvailableMoves(2)%> of <%=AvailableMoves(3)+1%></FONT>
                  
                  <TABLE BORDER="7" CELLPADDING="5" WIDTH="60%" HEIGHT="10%" NOWRAP COLS="3" CLEAR="RIGHT" BORDERCOLOR="DARKBLUE" RULES="NONE" title="Query" bordercolordark="Blue">
                        <!-- (Row) 1-->
                        <TR>
                              <TD WIDTH = "33%">
                                    <B><FONT SIZE="-1">Call #</FONT></B><BR>
                                    <INPUT NAME="CALLNUMBER" TYPE="TEXT" SIZE="4"  disabled VALUE="<%=Server.HTMLEncode(rs("CallNumber") &"")%>"></INPUT>
                              </TD>
                              <TD>
                                    <B><FONT SIZE="-1">Client/Project</FONT></B><BR>
                                    <SELECT NAME="CLIENTORPROJECT" disabled>
                                          <%
                                                rsCP.open "SELECT * FROM T_ClientOrProject WHERE ClientOrProject IS NOT NULL"
                                          %>
                                          <OPTION VALUE="<%=Server.HTMLEncode(rs("ClientOrProject") &"")%>"><%LookUpClientOrProject(Server.HTMLEncode(rs("ClientOrProject") &""))%></OPTION>
                                          <%
                                                
                                                rsCP.MoveFirst                                                
                                                do while not rsCP.EOF
                                          %>
                                                            <OPTION VALUE="<%=Server.HTMLEncode(rsCP("ClientOrProjectID") &"")%>">                              
                                                            <%=Server.HTMLEncode(rsCP("ClientOrProject") &"")%>
                                                            </OPTION>      
                                          <%                  
                                                rsCP.MoveNext
                                                loop
                                                rsCP.close
                                          %>                                    
                                    </SELECT>
                              </TD>
                              <TD>
                                    <B><FONT SIZE="-1">Priority</FONT></B><BR>
                                    <SELECT NAME="PRIORITY" disabled>
                                          <OPTION VALUE="<%=Server.HTMLEncode(rs("Priority") &"")%>"><%=Server.HTMLEncode(rs("Priority") &"")%></OPTION>
                                          <OPTION VALUE="1">High</OPTION>
                                          <OPTION VALUE="2">Medium</OPTION>
                                          <OPTION VALUE="3">Low</OPTION>
                                    </SELECT>
                              </TD>
                        </TR>
                        <!-- (Row) 2-->
                        <TR>
                              <TD>
                                    <B><FONT SIZE="-1">Log date</FONT></B><BR>
                                    <INPUT NAME="LOGDATE" TYPE="TEXT" SIZE="11" disabled VALUE="<%=Server.HTMLEncode(rs("InitCallLogDate") &"")%>">
                              </TD>
                              <TD>
                                    <B><FONT SIZE="-1">Log time</FONT></B><BR>
                                    <INPUT NAME="LOGTIME" TYPE="TEXT" SIZE="8" disabled VALUE="<%=Server.HTMLEncode(rs("InitCallLogTime") &"")%>"></INPUT>
                              </TD>
                              <TD>
                                    <B><FONT SIZE="-1">Call logger</FONT></B><BR>
                                    <SELECT NAME="CALLLOGGER" disabled>
                                          <OPTION VALUE="<%=Server.HTMLEncode(rs("CallLogger") &"")%>"><%=Server.HTMLEncode(rs("CallLogger") &"")%></OPTION>
                                          <%
                                                rsEC.open "SELECT * FROM T_EmployeeCharacter"
                                                do while not rsEC.EOF
                                          %>
                                                      <OPTION VALUE="<%=Server.HTMLEncode(rsEC("Name") &"")%>">
                                                      <%=Server.HTMLEncode(rsEC("Name") &"")%>
                                                      </OPTION>
                                          <%
                                                rsEC.MoveNext
                                                loop
                                                rsEC.MoveFirst
                                                'To be used again for the Last Call logger
                                          %>                                    
                                          
                                    </SELECT>
                              </TD>
                        </TR>
                        <!-- (Row) 3-->
                        <TR>      
                              <TD COLSPAN="3">
                                    <B><FONT SIZE="-1">Short decription</FONT></B><BR>
                                    <INPUT NAME="SHORTDESCRIPTION" TYPE="TEXT" SIZE="45" disabled VALUE="<%=Server.HTMLEncode(rs("ShortDescription") &"")%>"></INPUT>
                              </TD>
                        </TR>
                        <!-- (Row) 4-->
                        <TR>
                              <TD>
                                    <B><FONT SIZE="-1">Deadline date</FONT></B><BR>
                                    <INPUT NAME="DEADLINEDATE" TYPE="TEXT" SIZE="11" disabled VALUE="<%=Server.HTMLEncode(rs("DeadlineDate") &"")%>"></INPUT>
                              </TD>
                              <TD>
                                    <B><FONT SIZE="-1">Status</FONT></B><BR>
                                    <SELECT NAME="STATUS" disabled>
                                          <OPTION VALUE="<%=Server.HTMLEncode(rs("CurrentStatus") &"")%>"><%=Server.HTMLEncode(rs("CurrentStatus") &"")%></OPTION>
                                          <%
                                                rsST.open "SELECT * FROM T_Status"
                                                do while not rsST.EOF
                                          
                                          %>
                                                <OPTION VALUE="<%=Server.HTMLEncode(rsST("Status") &"")%>">
                                                <%=Server.HTMLEncode(rsST("Status") &"")%>
                                                </OPTION>
                                          <%
                                                rsST.MoveNext
                                                loop
                                                rsST.close
                                          %>      
                                          
                                    </SELECT>
                              </TD>
                              <TD>
                              </TD>
                        </TR>
                        <!-- (Row) 5-->
                        <TR>      
                              <TD>
                                    <B><FONT SIZE="-1">Last status change date</FONT></B><BR>
                                    <INPUT NAME="DATESTATUSCHANGED" TYPE="TEXT" SIZE="11" disabled VALUE="<%=Server.HTMLEncode(rs("DateStatusChanged") &"")%>"></INPUT>
                              </TD>
                              <TD>
                                    <B><FONT SIZE="-1">Last status changer</FONT></B><BR>
                                    <SELECT NAME="LASTSTATUSCHANGER" disabled>
                                          <OPTION VALUE="<%=Server.HTMLEncode(rs("LastStatusChanger") &"")%>"><%=Server.HTMLEncode(rs("LastStatusChanger") &"")%></OPTION>
                                          <%
                                                do while not rsEC.EOF
                                          %>
                                                <OPTION VALUE="<%=Server.HTMLEncode(rsEC("Name") &"")%>">
                                                      <%=Server.HTMLEncode(rsEC("Name") &"")%>
                                                </OPTION>
                                          <%
                                                rsEC.MoveNext
                                                loop
                                                rsEC.MoveFirst
                                                'use again for next one
                                          %>
                                          
                                    </SELECT>
                              </TD>
                              <TD>
                              </TD>
                        </TR>
                        <!-- (Row) 6-->
                        <TR>
                              <TD>
                                    <B><FONT SIZE="-1">Assigned to</FONT></B><BR>
                                    <SELECT NAME="ASSIGNEDTO" disabled>
                                          <OPTION VALUE="<%=Server.HTMLEncode(rs("AssignedTo") &"")%>"><%=Server.HTMLEncode(rs("AssignedTo") &"")%></OPTION>
                                          <%
                                                do while not rsEC.EOF
                                          %>
                                                <OPTION VALUE="<%=Server.HTMLEncode(rsEC("Name") &"")%>">
                                                      <%=Server.HTMLEncode(rsEC("Name") &"")%>
                                                </OPTION>
                                          <%
                                                rsEC.MoveNext
                                                loop
                                                rsEC.close
                                                'no use anymore on this page
                                          %>
                                    </SELECT>
                              </TD>
                              <TD>
                                    <B><FONT SIZE="-1">Workload</FONT></B><BR>
                                    <INPUT NAME="WORKLOAD" TYPE="TEXT" SIZE="4" disabled VALUE="<%=Server.HTMLEncode(rs("WorkLoad") &"")%>"></INPUT>
                              </TD>
                              <TD>
                              </TD>
                        </TR>
                        <!-- (Row) 7-->            
                        <TR>
                              <TD>
                                    <B><FONT SIZE="-1">Required skill</FONT></B><BR>
                                    <SELECT NAME="REQUIREDSKILL" disabled>
                                          <OPTION VALUE="<%=Server.HTMLEncode(rs("RequiredSkill") &"")%>"><%=Server.HTMLEncode(rs("RequiredSkill") &"")%></OPTION>
                                          <%
                                                rsRS.open "SELECT * FROM T_RequiredSkills"
                                                do while not rsRS.EOF
                                          %>
                                                <OPTION VALUE="<%=Server.HTMLEncode(rsRS("RequiredSkill") &"")%>">
                                                      <%=Server.HTMLEncode(rsRS("RequiredSkill") &"")%>
                                                </OPTION>
                                          <%
                                                rsRS.MoveNext
                                                loop
                                                rsRS.close
                                                'no use anymore on this page
                                          %>
                                    </SELECT>
                              </TD>
                              <TD>
                                    <B><FONT SIZE="-1">Required skill level</FONT></B><BR>
                                    <INPUT NAME="REQUIREDSKILLLEVEL" TYPE="TEXT" SIZE="4" disabled VALUE="<%=Server.HTMLEncode(rs("RequiredSkillLevel") &"")%>"></INPUT>
                              </TD>
                              <TD>
                                    <B><FONT SIZE="-1">Time spent</FONT></B><BR>
                                    <INPUT NAME="TIMESPENT" TYPE="TEXT" SIZE="4" disabled VALUE="<%=Server.HTMLEncode(rs("TimeSpent") &"")%>"></INPUT>h
                              </TD>
                        </TR>
                        <!-- (Row) 8-->
                        <TR>
                              <TD COLSPAN = "3">
                                    <B><FONT SIZE="-1">Detail</FONT></B><BR>
                                    <TEXTAREA NAME="DETAIL" ROWS="5" COLS="55" disabled><%=Server.HTMLEncode(rs("DetailedDescription") &"")%></TEXTAREA>
                              </TD>
                        </TR>      
                  </TABLE>
                  
                  <%
                        rs.Close
                  %>
                  </FONT>
            </FORM>
0
 
LVL 1

Author Comment

by:The_Brain
ID: 6340309
Very nice =)
I LOVE this table nesting... god why did I use it in the first place!

It totally rules ;)

I can align it no problems, some basic tecniques to use when you apply table and it's contents.

~Ixeus

Thanks again for your help, if you have MSN messenger look me up under Ixeus@hotmail.com :)


0
 
LVL 15

Expert Comment

by:a.marsh
ID: 6341374
Glad to have helped.

Thanks for the A!

:o)

Ant
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Search Item in Table 2 43
Local HTML file to display local Access MDB data in browser 4 61
HTML INPUT 6 22
output in HTML format powershell 6 24
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question