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 7880265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:06:13+00:00 2026-06-03T04:06:13+00:00

I do not know if there is anything specific with styling JSF datatable but

  • 0

I do not know if there is anything specific with styling JSF datatable but I can not get the row height changed.

Here is my datatable:

<h:dataTable value="#{myBean.myValue}"
             rowClasses="dt_row"
             var="o">


</h:dataTable>

Here is my css dt_row class:

.dt_row {
    height: 10px;
}

But when the rows is generated the height remains the same no matter what values I specify in my css class.
The source of generated page looks like this and it seems ok:

<tr class="dt_row">

Any ideas?

Here is my whole table:

    <h:dataTable value="#{searchBean.searchResult.concordances}"
                 styleClass="table"
                 var="concordance">

        <h:column>
            <pre>#{concordance.left}</pre>
        </h:column>

        <h:column>
            <pre style="color: blue;">#{concordance.middle}</pre>
        </h:column>

        <h:column>
            <pre>#{concordance.right}</pre>
        </h:column>

    </h:dataTable>
  • 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-06-03T04:06:15+00:00Added an answer on June 3, 2026 at 4:06 am

    HTML tr doesn’t have height attribute. The height can be defined for td.

    <ui:composition xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core">
        <h:head>
            <title>DataTable Row Height Sample</title>
            <style type="text/css">
                table {
                    width: 200px;
                }
                table tr {
                    color: darkorange;
                }
                table tr td {
                    height: 80px;
                }
            </style>
        </h:head>
        <h:body>
            <h:form id="myForm">
                <h1>Show data</h1>
                <!-- check that I'm using styleClass, not rowClass -->
                <h:dataTable id="dataTable" var="data" value="#{datatableBean.lstData}"
                    border="1" styleClass="table">
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="ID" />
                        </f:facet>
                        <h:outputText value="#{data.id}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Value" />
                        </f:facet>
                        <h:outputText value="#{data.value}" />
                    </h:column>
                </h:dataTable>
            </h:form>
        </h:body>
    </ui:composition>
    

    UPDATE:

    I’ve tested this in Chrome 18 and IE 9. I’ll include images of the table changing only the td height:

    height: 30px;

    enter image description here

    height: 50px;

    enter image description here

    height: 10px;

    enter image description here

    As you can see, the row height changes. Maybe you’re testing in Internet Explorer and your style changes are not updated. To change its behavior, go to Tools / Internet Options then in the section Browsing History select Settings a popup will appear, in the section Temporary Internet Files check the first option Every time I visit the webpage now select OK to close the popup and OK again to close the Internet Options, update your website and you can see the changes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know the #warning directive does not exist in vb.net... is there anything like
I know there should not be multiple publishers publishing the same event. But how
I know there is a lot of controversy (maybe not controversy, but arguments at
I know there is one, but it's not easy to implement the way I
I know there are tons of threads regarding this issue but I have not
I know there is xmlrpc plugin for trac. But I is not my trac
I know there are questions similar to this one, but I've not found a
I know there are plugins that do this, but I need something pretty specific
I do not know why there are 2 matches found aside from the input
I know there is no finder built into django for this (at least not

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.