I haven't tried it, but you should be able to do this by tweaking the following CSS rules:

th.sorted a, th.sortable a {
    background-position: right;
    display: block;
}
th.sortable a {
    background-image: url(../img/arrow_off.png);
}
th.order1 a {
    background-image: url(../img/arrow_down.png);
}
th.order2 a {
    background-image: url(../img/arrow_up.png);
}

Just add some right padding to the headers. For example, if your sorting gifs are 15 pixels wide,

th.sorted a, th.sortable a {
  padding-right: 15px;
}

If that doesn't do it, try applying the padding to the th instead of the a and/or moving the background styles to the th instead of the a.

L.

On 19-Sep-05, at 5:45 PM, Shreedeep Mitra wrote:


Hi

I am facing the same problem and unable to come to a solution

What is the technique to limit the column header length to little more than required, so that the sorting gifs don't overlap with the headertext?

Thanks in advance for your time

Shreedeep.


[EMAIL PROTECTED] wrote on 09/05/2005 05:26:32 PM:

> Can someone provide me the css necessary to make the sorting image not show
> up underneath the column title? When the column width is not wide enough for
> both the column title and the sort image, then the sort image goes behind
> the title. I'd rather that the min width never got that small.
>
> Here is the css I'm using now:
>
> .simpletable th.sortable a, th.sortable a:visited, th.sortable a:hover{
>    background-position: right;
>    display: block;
>     background-color: transparent;
>     width: 100%;
> }
> .simpletable th.sorted a, th.sorted a:visited, th.sorted a:hover{
>    color: #990033;
>    background-position: right;
>    display: block;
>     background-color: transparent;
>     width: 100%;
> }
> .simpletable th.sortable a {
>    background-image: url(../images/sort-none.gif);
>    background-repeat:no-repeat;
> }
> .simpletable th.sortable a:hover {
>    background-repeat:no-repeat;
>    color: #0D0D0D;
> }
> .simpletable th.order1 a, th.order1 a:hover {
>    background-image: url(../images/sort-asc.gif);
>    background-repeat:no-repeat;
>    color: #0D0D0D;
> }
> .simpletable th.order2 a, th.order2 a:hover {
>    background-image: url(../images/sort-desc.gif);
>    background-repeat:no-repeat;
>    color: #0D0D0D;
> }
>
> TIA,
> Brian Barnett
>
> ****************************************************************************
> This email may contain confidential material.
> If you were not an intended recipient,
> Please notify the sender and delete all copies.
> We may monitor email to and from our network.
> ****************************************************************************
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> displaytag-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/displaytag-user

--
Laurie Harper
Open Source advocate, Java geek: http://www.holoweb.net/laurie
Founder, Zotech Software: http://www.zotechsoftware.com/



Reply via email to