Skip to content

Table using colgroup and col for widths #382

Description

@jeffgabhart

Either a bug or something I am doing wrong.. I'm creating a 100% width table with fixed width columns, and the last column needs to take up the rest of the table width.

I end up with columns of the same size that run off the right side of the page.

<style>
table, th, td {
    border: 1px solid black;
    border-collapse: collapse;
}
</style>
<table style="width: 100%">
    <colgroup>
        <col style="width: 200px">
        <col style="width: 100px">
        <col style="width: 50px">
        <col>
    </colgroup>
    <tbody>
        <tr>
            <td>1</td>
            <td>2</td>
            <td>3</td>
            <td>4</td>
        </tr>
        <tr>
            <td>5</td>
            <td>6</td>
            <td>7</td>
            <td>8</td>
        </tr>
    </tbody>
</table>

report

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugExisting features not working as expected

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions