Forums de discussion
Cellpadding tag is not working
Pravin Gate, modifié il y a 11 années.
Cellpadding tag is not working
Junior Member Publications: 57 Date d'inscription: 24/04/12 Publications récentes
Hi I am trying to create a simple application using jsf-portlet, but in that cellpadding is not working.
just try to run this code.(you can also try to run primefaces 3.2 demos from here http://www.primefaces.org/showcase/ui/spinner.jsf as a jsf portlet)
.
please guide me what should I need to do for it.
just try to run this code.(you can also try to run primefaces 3.2 demos from here http://www.primefaces.org/showcase/ui/spinner.jsf as a jsf portlet)
<h:form>
<h:panelgrid columns="2" cellpadding="10">
<h:output text value="test1" />
<h:output text value="test2" />
<h:output text value="test3" />
<h:output text value="test4" />
</h:panelgrid>
</h:form>
.
please guide me what should I need to do for it.
Hitoshi Ozawa, modifié il y a 11 années.
RE: Cellpadding tag is not working
Liferay Legend Publications: 7942 Date d'inscription: 24/03/10 Publications récentes
Try using style="padding:10px;"
Pravin Gate, modifié il y a 11 années.
RE: Cellpadding tag is not working
Junior Member Publications: 57 Date d'inscription: 24/04/12 Publications récentes
I tried it, nut it is also not working, for now I am using <p:spacer> as a sub way.
But why cellpadding doesnt supports in liferay .(liferay-jsf portlet)?
As I need to make forms, so I will need cellpadding, and <p:spacer> is not final solution.
So please suggest me solution.
But why cellpadding doesnt supports in liferay .(liferay-jsf portlet)?
As I need to make forms, so I will need cellpadding, and <p:spacer> is not final solution.
So please suggest me solution.
Neil Griffin, modifié il y a 11 années.
RE: Cellpadding tag is not working
Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
A good practice is to use CSS styles instead of deprecated HTML tag attributes like cellpadding and cellspacing. In this case, the Liferay theme is "winning" and the browser is ignoring your cellpadding value.
I recommend that you create a file in your portlet with this path:
WEB-INF/resources/example/liferay-theme-override.css
Then inside the file, put this code:
Then in your main XHTML view, put this line of markup:
Finally, add styleClass="my-panel-grid" to your h:panelGrid component tag:
I recommend that you create a file in your portlet with this path:
WEB-INF/resources/example/liferay-theme-override.css
Then inside the file, put this code:
.my-panel-grid tr td {
padding: 10px;
}
Then in your main XHTML view, put this line of markup:
<h:outputstylesheet library="example" name="liferay-theme-override.css" />
Finally, add styleClass="my-panel-grid" to your h:panelGrid component tag:
<h:panelgrid columns="2" styleclass="my-panel-grid">
<h:outputtext value="test1" />
<h:outputtext value="test2" />
<h:outputtext value="test3" />
<h:outputtext value="test4" />
</h:panelgrid>