Jump to content
Sign in to follow this  
ISIDEARMI

Aligning LocalStorage Table with Input Form

Recommended Posts

Hello,

 

MyProject

 

I am having a hard time making the form inputs align with the localstorage table. The forms will have to fit in between the ID and ACTIONS columns and align with where the data is being inputted. I also am having a hard time setting the widths for the table columns. Adjusting the padding is not a problem, but setting a set width is a problem. Any help would be greatly appreciated.

 

Also, is there any way to change the local storage ID something like GW-"DATE"-"TIME" rather than numerically going up 1-2-3-4-5-etc.?

 

Thank you,

 

I SIDEARM I

Share this post


Link to post
Share on other sites

You have some sophisticated code here but it seems a little daffy. For example you have a line of inputs inside divs that ought to simply go into the table. Did you write this code? What advantage do you see in changing the ID? Do you want the input line below the table? To me it seems a little more natural to have it above the table.

Share this post


Link to post
Share on other sites

To align the headings with the corresponding inputs, include them in the TD's of another table row. And I would agree that there seem to be a few surplus divs in there.

 

Your index input is constrained to be "number". Make it "text" if you want it as described.

 

 

EDIT. I see, on further inspection that your Contacts object adds table rows to the end of the table, so if you adopted my suggestion, you would be adding after the data entry row.

Edited by johncc

Share this post


Link to post
Share on other sites

I came up with two versions.

 

Yes. And the Save/Discard buttons are probably supposed to be in the Action cell of the input line

Share this post


Link to post
Share on other sites

As I am teaching my self HTML and usually into making things streamlined and a touch of quality, my question to the professionals here on his code and anyother is it ideal to do height in px and width in %?

Share this post


Link to post
Share on other sites

As I am teaching my self HTML and usually into making things streamlined and a touch of quality, my question to the professionals here on his code and anyother is it ideal to do height in px and width in %?

 

There are various philosophies but that is a pretty good approach.

Share this post


Link to post
Share on other sites

 

Yes. And the Save/Discard buttons are probably supposed to be in the Action cell of the input line

 

Oh, yeah that fits.

Share this post


Link to post
Share on other sites

Wow! Thanks for all of the replies. I took some code for a contacts list that used local storage and had 3 options and worked with it to fit my needs.....maybe I should post what I am trying to accomplish and you guys can tell me if localstorage is the way to go or if there is another option or pathway I should be looking into.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...