Skip to main content
August 31, 2010
Question

cfgrid - "style" attribute does nothing

  • August 31, 2010
  • 1 reply
  • 1424 views

I'm trying to reduce the width of the border around my cfgrid. I want a 1 px border, but the grid is showing up with a 2 or 3 px border. I tried using the style attribute, but it has no effect on the grid. In fact, I don't even see my style attribute being output anywhere in the document.

When I inspect the grid, I see a div (<div id="cfgrid1283278813192"... >) that has an inline style:

"width: 625px; border: 1px solid rgb(204, 204, 204); overflow: hidden; height: 500px;"

When I change this inline style, and set the border to 0, the grid renders the way I want. But I don't see a way to gain control over this inline style. It seems like my style attribute should be applied in this div.

Is this broken or am I missing something?

    This topic has been closed for replies.

    1 reply

    Inspiring
    August 31, 2010

    It doesn't seem to work, no.  There's a bug raised for this, you should vote for it: http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=76491

    In the meantime, you should be able to overload the CSS that CF applies to the grid.  All the elements within the grid seem to have IDs and classes (the outer ID seems randomly generated, but the inner ones seem predictable?  Dunno, didn't investigate too much.

    --

    Adam

    August 31, 2010

    Thanks! I voted for the bug. I don't think I can override the style because there's no class for the grid... and the id seems to be automatically generated by CF. And the style that needs to be overriden is an inline style.

    August 31, 2010

    I tried all the CSS tricks I can think of, but I can't figure out a way to override the inline style without affecting the entire grid.