Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lining up header and body columns - a fix #43

Open
fredmc opened this issue Feb 22, 2017 · 2 comments
Open

Lining up header and body columns - a fix #43

fredmc opened this issue Feb 22, 2017 · 2 comments

Comments

@fredmc
Copy link

fredmc commented Feb 22, 2017

If you give a width to a table cell/column, and the content is wider than that and cannot be wrapped (for example, a url with no spaces), most browsers will make the column wider. This causes the columns in the body and header to no longer be aligned.

I fixed this by putting style="max-width:150px; min-width:150px;" in each and tag. Of course, I use the correct width for each.

For what it's worth.

Great plugin. After the above fix, way better than anything else I could find.

@tonyfarr
Copy link

Hi fredmc, I've been looking at this issue in my table for a couple of days now. Couldn't figure it out! Thanks for posting this. My table is now working as it should!!

@jxramos
Copy link

jxramos commented May 11, 2017

I noticed some odd header column vs body column width dependencies playing with the colModal array values. Seemed like I had to tune in magic numbers to get the two regions to display properly. fredmc, when you say "Of course, I use the correct width for each." Is that a comment on your max-width and min-width settings or are you referring to the colModal widths?

From what I can tell the developer needs to tune their colModal widths to reasonable widths for each column. This is tricky for my application since I'm displaying arbitrary tables, where I don't know in advance what the column widths are going to be. The row heights seem to present no issues, just this column width stuff. I'm trying to do some formulaic generating of colModal widths on the server side from a jinja template that's working from an array of ints that derive from the number characters for the widest string in the columns of my table. Haven't quite nailed it yet however.
columnmisalignment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants