How to keep colstyle with IE8 ?

(3 posts) (2 voices)

Tags:

  1. tithus, Member

    Hi,

    I've created a style named 'big_size'.
    This style is coming from the user guide and looks like this:

    [overflow:hidden; white-space: nowrap; text-overflow:ellipsis; width: 200px;max-width: 200px;]

    It's working well with firefox using the command:

    SELECT 'dbr.colstyle',1, mydbr_style('big_size');

    But It's not working with IE8 which is the required browser.

    Any idea of how I can have columns of 200px with IE8?

  2. myDBR Team, Key Master

    Hi,
    IE8's support for CSS leave something to be desired (IE9 being much better).

    To make IE8 (and IE7) to play nice, the easiest solution is to use a function, which wraps the content inside a fixed width DIV.

    Create a function called fn_width:

    CREATE FUNCTION fn_width( inTxt varchar(1000),  inWidth int )
    RETURNS varchar(1000) CHARSET utf8
    BEGIN return concat('dbr.purehtml:<div style="overflow:hidden; text-overflow:ellipsis;width:',
    cast(inWidth as char(5)), 'px;">', inTxt, '</div>'); END

    and then use it instead of a column style:

    select fn_width( longtext, 100 )
    from mytable;

    --
    myDBR Team

  3. tithus, Member

    this is working well!

    thanks


Reply

You must log in to post.