CSS: How to specify a min-width on a table?


Tags: css

Problem :

I have a table that is supposed to take up 100% of the width, but when I shrink my browser window, I also need it to obey a min-width. However, applying a min-width on the table has no affect (viewing in the latest version of Safari).

How can this be done?

<table width="100%" style="min-width:800px">...</table>


Solution :

Apply the min-width on a container div.

Also note: min-width can be specified for td elements.


    CSS Howto..

    Google fonts and twitter bootstrap 3: where should I load the fonts, and how to use it in css file?

    How do I trigger an onclick CSS on a particular ID

    How to have only a vertical scroll bar on a div

    How to use metro ui css sidebar and compact classes

    How to get dimensions for a background image when background-size is set to contain?

    How to align an img and a carousel next to each other, with max-width of 1000px?

    How to generate width CSS from JavaScript / C#

    JQuery: how to make this variable negative before declaring it as a CSS value?

    How to combine grouped inputs with aligned forms?

    How to keep an unordered list centered within the screen?

    how to make form input in middle

    jQuery + CSS: How to scroll smooth, regarding a fixed header?

    How to align content of a div to the bottom?

    How to separate css style from common to different statement

    how to give no-more-use of css in jquery for css params

    How to set textbox width fit in table cell CSS

    How to align buttons arround a circle image

    How to make css smaller?

    How to add CSS to my HTML code on Notepad++

    how to find a css class which has another css class as sibling

    How to fade between classes in a conditional query

    How to make CSS triangles (with borders) compatible across browsers

    How to style a