Jump to content

Aligning LocalStorage Table with Input Form


ISIDEARMI

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

Link to comment
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.

Link to comment
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
Link to comment
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.

Link to comment
Share on other sites

  • 1 month later...

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.

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...