Size table

Size table

kastendeuchkastendeuch Posts: 5Questions: 0Answers: 0
edited February 2013 in DataTables 1.9
Hello,
I want to make a table but the boxes change when I change pages. I tried to use FixedColumns but it is not pretty . I would like scrolbars are in boxes or there's too many characters there and the table remains with the arrows to change pages. Which is not the case with Fixedcolumns.

I show two screen.
http://hpics.li/6d534d9

http://hpics.li/e89283f

For example to have a scroll just for the fifth row in the firste column.

Sorry for my poor english. And thank you for help.

Replies

  • EranEran Posts: 26Questions: 0Answers: 0
    Hi,

    If I understand your request correctly, you want scrollbars in the table cell in case of a text overflow ?
    I think it's a bad design.

    In a table I designed long ago, if the text was overflowing you would see the rest of it while hovering over the cell (while maintaining a fixed column size). That way the cell size wouldn't change and you could still see the whole content.

    This can be easily achieved by using the HTML's title attribute or even better - a div powered by JQuery.
    Either way - I think it's a desired feature.
  • kastendeuchkastendeuch Posts: 5Questions: 0Answers: 0
    edited February 2013
    Ty for your reply

    yes,That's a good idea but the problem it's i dont have the knowledge in jquery and js I have only knowledge in php html css
    do you have any tips for me please?

    I tried to used table-layout: fixed; on the
    and
    overflow: hidden on the
  • EranEran Posts: 26Questions: 0Answers: 0
    edited February 2013
    What I think you need to do is to use the width attribute of your table and your table's wrapper (if it's within another div or table for example) so the whole table wont expand itself beyond the width you want.

    Regarding the cell itself, for now, I guess you have no choice but to use DataTables' sWidth an specify a fixed width.

    Regarding the suggestion I've made - I guess it needs to be implement within the DataTables plugin itself or as an extra plugin.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    As a plug-in :-). I've often thought about writing a plug-in that will read attributes form the table and columns so you can use them to initialise the table through attributes, but never quite got around to it. A plug-in for after v1.10 I think that will hopefully be quite useful with `data-` attributes.

    Allan
  • kastendeuchkastendeuch Posts: 5Questions: 0Answers: 0
    Hi Eran and Allan
    i used the Extra scroller on my table and was not bad before i tried to add Two buttons. when i added two buttons "delete" and "update" for my table i have a problem with the CSS. In fact my css disappears.
    I do not know what to do.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Check your Javascript debugger, and if that doesn't help link us to a test case.

    Allan
  • kastendeuchkastendeuch Posts: 5Questions: 0Answers: 0
    Hi,

    I updated my table then there is no boxes with lots of characters so I removed the scrollbars but when I add columns to my table I always errors. I used firebugs for to see errors. . i could watch a lot of errors in demo_page.js and demo_table.js. I tried to use js debugger and i had a page venkman-static.js who pop but i didnt see other things.
    an extract from firebugs

    http://hpics.li/a2cee9c

    property "zoom" unknown.Declaration surrend. line 36
    Declaration expected but '*' found. Transition to the next statement. line 82,157,268,338
    property "moz-border-radius" unknown.Declaration surrend. line 120
    property "box-sizing unknown.Declaration surrend.
This discussion has been closed.