But the css class is in the output. Can't it be a styling problem?
I.e. the css being by more specific rule?

Can you try something like

th.centerAlign *  {
  text-align: center !important;
}

Or even more specific clas

th.centerAlign div.imxt-a {
text-align:center !important;
}

If that doesn't work, this should

div.imxt-vista table.imxt-head th.centerAlign div.imxt-a {
text-align:center !important;
}

You should use firebug (or something similar) to inspect the elements
to see which CSS ruels get applied and how to override them.

-Matej

On Mon, Feb 1, 2010 at 4:45 PM, Warren Bell <warrenbe...@gmail.com> wrote:
> I am having a problem with AbstractColumn#getHeaderCssClass() in an inmethod
> datagrid. It is writing my css class to the th tag but my css class is not
> working. I think it is something to do with IE8. Unfortunately the company
> that uses this app uses IE8 and the app is written for IE8. Digging threw
> the code, I can see were the css class name is added, but there does not
> seem to be any way to modify it or implementing my own ColumnHeader panel
> without copying a whole lot of classes. I think it would probably be better
> if the users css class was added to its own div tag.
>
> Anyway, does anyone know of a simple way of getting my css class to work in
> an InMethod grid header? All I want to do is center the header text.
> Customers can get real nit picky.
>
> The same class works for an individual cell:
>
>           @Override
>           public String getCellCssClass(IModel rowModel, int rowNum)
>           {
>               return "centerAlign";
>           }
>          but, this does not work for the header:
>
>           @Override
>           public String getHeaderCssClass()
>           {
>               return "centerAlign";
>           }
>
> The th tag that is getting created is:
>
> <th style="width:125px" class="imxt-want-prelight centerAlign"><div
> class="imxt-a"><div class="imxt-b"><a id="id20" href="#"
> class="imxt-sort-header imxt-sort-header-none" onclick="var
> wcall=wicketAjaxGet('?wicket:interface=:4:body:grid:header:header:getOrderCostFromItems::IBehaviorListener:0:',null,null,
> function() {return Wicket.$('id20') != null;}.bind(this));return !wcall;">
> <div class="imxt-sort-header1"><div>Total</div></div>
> </a></div><a class="imxt-handle" href="#" onclick="return
> false"></a></div></th>
>
> My css class:
>
> .centerAlign {
>   text-align: center;
> }
>
> --
> Thanks,
>
> Warren
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to