Flexible table width example: css uses div.container but I don't see that in the HTML

Flexible table width example: css uses div.container but I don't see that in the HTML

kdubskdubs Posts: 9Questions: 4Answers: 0

this example:

https://datatables.net/examples/basic_init/flexible_width.html

the ccs looks like this:

div.container {
        width: 80%;
    }

but I don't see the class container in the HTML. should this be something like dt-container?

Answers

  • kthorngrenkthorngren Posts: 21,680Questions: 26Answers: 5,019

    That came from the 1.x example. I believe it is simply there to make the container the table is in smaller than it typically would be in the other examples. Its purely for the exampel but is not specifically needed in your solution. The key is to add style="width:100%" to the table tag. I believe the next release or so of Datatab;es will automatically do this for you.

    @allan may need to clean up the CSS tab of the example you linked to.

    Kevin

  • allanallan Posts: 64,015Questions: 1Answers: 10,555 Site admin

    Good point - thank you both! I've committed a change which I'll deploy to the site soon.

    Allan

Sign In or Register to comment.