Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 917109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:09:24+00:00 2026-05-15T18:09:24+00:00

I know this is a bit strange and believe me it’s not the way

  • 0

I know this is a bit strange and believe me it’s not the way I would have done it but I was given this project and now I have to live with it.

I have a table that is sortable on my page (created with DisplayTag libraries) and to indicate which column is being sorted a background image is assigned to the column header.

The problem I’m having is that the image is getting displayed over the text (or behind… can’t really tell with black on black :\ ) Obviously this is to be expected since it’s a background image instead of an actual image.

I was wondering if anyone knew of a way I could insure that the background image isn’t displayed until after the text using css. I realize changing it would be the smarter route but at this point time is a factor and changing it would require too much work.

Any advice is appreciated!

Code:

Display tag table definition

<display:table name="results" class="displayTag" sort="list" export="true" pagesize="0" requestURI="queryReportResult.action">  
    <% for (int i=0; i < displayProperties.length; i++) { %>
      <display:column property="<%=displayProperties[i].getName()%>" title="<%=displayProperties[i].getDisplayName()%>" decorator="<%=displayProperties[i].getDecorator()%>" sortable="true" headerClass="sortable" />
    <% } %>
    <display:setProperty name="export.pdf" value="true"/>
    <display:setProperty name="export.xml" value="false"/>
    <display:setProperty name="export.pdf.filename" value="<%=report.getName() + \".pdf\"%>"/>
    <display:setProperty name="export.csv.filename" value="<%=report.getName() + \".csv\"%>"/>
    <display:setProperty name="export.excel.filename" value="<%=report.getName() + \".xls\"%>"/>      
  </display:table>

CSS definitions

table.displaytag a {        
    font-size: 10pt;
}

table.displaytag th {
    padding-left: 5px;
    padding-right: 15px;
    font-size: 10pt;
    border-bottom: 1px solid black;
}

table.displaytag th.sorted a,table.displaytag th.sortable th.sortable-right a {
    background-repeat: no-repeat;
    background-position: right;
    display: block;
    text-align: center;
    width: 100%;
    height: 100%;
}

table.displaytag th.order1 a {
    background-image: url(../images/down-arrow.png);
    background-position: bottom center;
}

table.displaytag th.order2 a {
    background-image: url(../images/up-arrow.png);
    background-position: bottom center;
}

And actual code from page

<th class="sortable">
<a href="queryReportResult.action?d-49653-s=4&amp;d-49653-o=2&amp;d-49653-p=1">This Info </a></th>
<th class="sortable sorted order1">
<a href="queryReportResult.action?d-49653-s=5&amp;d-49653-o=1&amp;d-49653-p=1">Other Info </a></th>

<th class="sortable">
<a href="queryReportResult.action?d-49653-s=6&amp;d-49653-o=2&amp;d-49653-p=1">Info </a></th>

As you can see when the column is sorted it gets the sorted and order1 classes, and the order1 is the class that adds the background image.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T18:09:25+00:00Added an answer on May 15, 2026 at 6:09 pm

    Well… here’s how I fixed this one, thanks mostly to Google 😀

    I basically just aligned the background image to the bottom and then added a margin-bottom so that the text couldn’t write all the way to the bottom.

    Here’s the code!

    table.displaytag th.sorted a,table.displaytag th.sortable th.sortable-right a {
        background-repeat: no-repeat;
        background-position: right;
        display: block;
        text-align: center;
        width: 100%;
        height: 100%;
    }
    
    table.displaytag th.order1 a {
        background-image: url(../images/down-arrow.png);
        background-position: bottom center;
        margin-bottom:15px;
    }
    
    table.displaytag th.order2 a {
        background-image: url(../images/up-arrow.png);
        background-position: bottom center;
        margin-bottom:15px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this is a bit bleeding edge, but here's the question anyway: Given
I know this is bit of a strange one but if anyone had any
I know this is a bit generic, but I'm sure you'll understand my explanation.
I know this topic is bit old, but i did surf the web and
I know this might be a bit awkward but I am trying to modify
I know this has a stupid solution but, sorry, I'm little bit confused. I
This might sound a bit of an odd question but I know what I
Pretty confused right now, while i feel i know a bit about vhosts this
I know the title is a little bit strange, but here is what the
I know this has been asked 100 times before but every bit of code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.