Search code examples
htmlcsscss-tables

HTML/CSS: How do I set the size of this table?


If you visit the link below and add an item to your cart (to make the cart appear in the sidebar), you'll notice that the cart overlaps past the edge of the sidebar widget.

http://savageworkouts.com/2012/05/07/sample-product/

What CSS do I need to write to make the table be the size of it's parent container?


Solution

  • Write table-layout:fixed in your table.eshop. write like this:

    table.eshop {
        border-collapse: collapse;
        table-layout: fixed;
        width: 99%;
        word-wrap: break-word;
    }