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

  • Home
  • SEARCH
  • 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 9086921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:35:54+00:00 2026-06-16T21:35:54+00:00

When i use this snippet code <h:panelGrid id=myGrid columns=1 rendered=#{myBean.showResults} width=50% border=1 style=text-align: center;>

  • 0

When i use this snippet code

<h:panelGrid id="myGrid" columns="1"
rendered="#{myBean.showResults}" width="50%"
border="1" style="text-align: center;">  

The items of the panelGrid will be centralized
BUT
I want to centralize h:panelGrid itself in the center of the my XHTML page
Like this HTML code

<table id="myGrid" border="1" align="center">
  • 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-16T21:35:55+00:00Added an answer on June 16, 2026 at 9:35 pm

    Provided that it has a known width, give it a left and right margin of auto. This way it will center itself relative to the parent block element.

    <h:panelGrid ... style="margin: 0 auto;">
    

    See also:

    • Center a div in CSS
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use this code : MethodInvoker TileLoadCompleteMethodInvoker = delegate() { CleanStatusLabelTimer.Enabled = true; MemoryTextBox.Text
i have this snippet of code that use an iterator on a list for
he guys... i use this litte code-snippet for jquery: function updown() { $('#red').animate({top:'+=100'}, 5000,
Currently I use this little snippet of code to get my java server up
With jQuery Mobile, I use this snippet to call libaries... <script src=//code.jquery.com/jquery-1.6.4.min.js></script> <script> if(typeof
I simplified my code to show the problem. When I use this Coffeescript snippet:
I use this code snippet to obtain a file as an input stream. The
I use this code snippet that verifies if the file specified in the URL
In Sencha Touch 2, I use this code snippet in my controller: this.control({ '#test_button':
As a malloc wrapper, I use this classical snippet of code: #define _GNU_SOURCE #include

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.