Search code examples
htmlcss-tablesblackberry-webworks

Set an html cell to a static width when creating a table for a mobile, blackberry app


I am trying to create a simple html/Javascript app for Blackberry 10. I'm having an issue with the following CSS code:

td
{
    width:100px;
    vertical-align:top;
}

It works correctly in Chrome on my laptop, however when I test it on my device I find the width shrinks to just cover the contents of the cell. The contents of the cell is definitely under 100px.

I have a feeling it might have something to do with how I am setting up the meta viewport.

<meta name="viewport" content="width=device-width, initial-scale=1"> 

Anyone know what the problem might be?


Solution

  • Thanks Rick, setting min width did the trick.

    td
    {
        min-width:100px;
        vertical-align:top;
    }