Help with AccordionPanel and CSS

UI Components for JSF
Post Reply
eabusato
Posts: 7
Joined: 02 Aug 2010, 17:24

02 Aug 2010, 17:39

Hello,

I have searched the forum but haven't found an answer to this. In the following code:

Code: Select all

<p:accordionPanel collapsible="true" style="font-size:10px; width: 640px;" >
	<p:tab title="Interval Customization">
		<p:dataTable>
			<p:column>
				<f:facet name="header">
					<h:outputText value="Start"  />
				</f:facet>
			</p:column>  
		</p:dataTable>
	</p:tab>
</p:accordionPanel>
How do i remove the space between the Accordion panel border and the table border? Or even the space between the accordion panel border and anything inside, like some text. I have tried all combinations of:

.ui-accordion .ui-accordion-content .ui-accordion-content-active {
margin:0px;
padding: 0px;
}

Thanks!!

Erick

eabusato
Posts: 7
Joined: 02 Aug 2010, 17:24

03 Aug 2010, 13:59

I have tried also inserting the margin:0 and padding:0 in the style="" field inside accordionPanel and the dataTable, but it did not work also.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

03 Aug 2010, 14:14

I'd suggest using firebug to see which style applies where and change it live to test it.

Panachovo
Posts: 1
Joined: 08 Nov 2011, 10:20

08 Nov 2011, 10:23

Hi, i've used FireBug to check the result for modify style for accodionPanel. The div of inside of tab don't change, so the unique solution I can see is modify .css, isn't it?

Thanks!

deusaquilus
Posts: 3
Joined: 07 Aug 2012, 11:11

07 Aug 2012, 11:18

Thanks to Optimus for suggesting Firebug, it was pretty easy to narrow down the problem. The following <style> tags will remove the padding:

Code: Select all

 <style>
 .ui-accordion .ui-accordion-content {
         padding: 2px;
     }
 </style>
Unfortunately this has an effect on every single accordion on the page as well.

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

07 Aug 2012, 11:49

Then create a more specific css rule... Basic CSS like in normal html. Nothing special

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

07 Aug 2012, 11:55

Then create a more specific css rule... Basic CSS like in normal html. Nothing special
+1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 43 guests