Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Closed Thread
Individual Forms per row... use table or ul?
Old 04-12-2010, 07:28 PM Individual Forms per row... use table or ul?
thehuskybear's Avatar
Ultra Talker

Posts: 362
Name: Sam
Location: Tucson, AZ
Trades: 1
So I have a list of items that I want to be edited inline (using ajax). Im trying to decided if it is better to use a table or a ul...

This is what I have now

HTML Code:
<ul>
   <li class="header round-top">
       <div style="width: 170px; display: inline-block;">Title</div>
       <div style="width: 380px; display: inline-block;">Descriptions</div>
       <div style="display: inline">Action(s)</div>
   </li>
   <li>
       <form name="item-1">
          //.... form stuff goes here
       </form
   </li>
   <li>
       <form name="item-2">
          //.... form stuff goes here
       </form
   </li>
</ul>
I like the idea of using the list method, but the problem is I have to set the width for each header div, which could be come a problem because I am using themes and inline styles are a bad idea (in my case atleast). What I rather do is set up a table where the header widths expand to fit the content, then the theme only needs to set the table width.

I thought I would do something like below because the form items need to be inline (in the list, I give each form item a style of "display: inline" in the css file).

HTML Code:
<table>
    <tr>
       <th>Title</th>
       <th>Description</th>
       <th>Actions</th>
    <tr>
        <td>
             <form name="item-1">
             <table>
                 <tr>
                     <td>///item1</td>
                     <td>///item2</td>
                 </tr>
             </table>
        </td>
    </tr>
    <tr>
        <td>
             <form name="item-21">
             <table>
                 <tr>
                     <td>///item1</td>
                     <td>///item2</td>
                 </tr>
             </table>
        </td>
    </tr>
</table>
The problem with this is the headers do not fit the width of each form item, I still need to set each width individually.

So Im wondering if there is a better way that Im not thinking of to make each header match the width of each form item (input, textarea, etc) dynamically?

Keep in mind these forms are being generated using php.

Thanks,

Sam
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
thehuskybear is offline
View Public Profile Visit thehuskybear's homepage!
 
 
Register now for full access!
Closed Thread     « Reply to Individual Forms per row... use table or ul?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.67155 seconds with 12 queries