Menu

controlling the width of the columns

Help
2005-04-11
2012-10-08
  • Hemant Mahidhara

    Hi,
    Is there a way to control the width of the columns generated by the display tag?

    Ideally I would like to specify a percentage value for each column width. Is that possible?

    Hemant

     
    • Hemant Mahidhara

      I am trying to use style to set the column width but it does not seem to be working.

      These are the style classes I have defined in the <head> of the jsp page.

      <style type="text/css">
      title_column {
      width:50%;
      }
      date_column {
      width:30%;
      }
      author_column {
      width:20%;
      }
      </style>

      Below is the usage of display tag where I try to make use of the style classes. But the column width is not changing.

      Please Help.

      <display:table name="data" class="simple" pagesize="20">>
      <display:column property="sentDateString" title="Date" class="date_column"/>
      <display:column property="title" title="Title" class="title_column"/>
      <display:column property="author" title="Author" class="author_column"/>
      <display:setProperty name="paging.banner.include_first_last" value="true" />
      </display:table>

      Hemant

       
      • Thinh Nguyen

        Thinh Nguyen - 2005-05-12

        I am currently facing the same problem... have you fixed this? please let me know if you found a solution for this already..

        thanks a lot
        Thinh

         
    • sesperance

      sesperance - 2005-04-15

      Hi, try this
      <display:column title="Montant" style="width: 20%;text-align: right;">

      and you will have the possibility to control the width of the column and if yo want the alignement.

      It works for me.

       

Log in to post a comment.

MongoDB Logo MongoDB