Solved

Tables - how can I put things NEXT to it

Posted on 2001-08-01
7
164 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

759 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now