Row alignment

(5 posts) (2 voices)

Tags:

No tags yet.

  1. fastscot, Member

    I'm still having trouble trying to get my row data left aligned. The rows are in an html table. No matter what I do, it ends up center aligned in the table. Here's an example code.

    select 'dbr.purehtml', '<table><tr><td align="left">';
    select <mydata columns>;
    select 'dbr.purehtml', '</td></tr></table>;

    I've tried various css styles including text-align, position:fixed etc. but nothing works. What's the trick to doing this?

    Thanks,

    Neil

  2. myDBR Team, Key Master

    myDBR automatically aligns data based on the datatype (strings to left, numbers to right etc).

    Do you want to align a a single column or all columns? What does select <mydata columns>; in your example actually contain?

    Easiest way to align a column is to use column style like this:

    select 'dbr.colstyle', 1, '[text-align: left]';

    --
    myDBR Team

  3. fastscot, Member

    I want to align all rows left justified in the table. The data is a mixture of text and numeric fields from a mysql table e.g. select qty, qtyr, description, item, uom from podetl;

  4. myDBR Team, Key Master

    Still do not quite undertand what you are trying to do. You want to create an extra wrapper table around myDBR resultset?

    If so, you can do following:

    select 'dbr.css', 'table.wrapper_table table { margin-left: 0px }';
    
    select 'dbr.purehtml', '<table class="wrapper_table"><tr><td align="left">';
    select <mydata columns>;
    select 'dbr.purehtml', '</td></tr></table>;

    --
    myDBR Team

  5. fastscot, Member

    That worked! Thanks.


Reply

You must log in to post.