primefaces override Style in element.style

UI Components for JSF
Post Reply
armainak
Posts: 7
Joined: 24 Jun 2014, 10:52

24 Jun 2014, 11:10

Hello,
PF 5.0 overrites the setting for width in element.style.


---------------------------------------------------------------------------------------
in xhtml file i use this PF component
---------------------------------------------------------------------------------------

Code: Select all

<p:layoutUnit
	id="bbb"
	position="center"
	styleClass="autoWidth" >


---------------------------------------------------------------------------------------
html Output
---------------------------------------------------------------------------------------
in a div

Code: Select all

<div id="bbb" ...>
element.style {
...
width: 1178px;
..
}

.autoWidth {
/* width: inherit; */ overriden via element.style.
}
---------------------------------------------------------------------------------------


using direct style does not change alote


---------------------------------------------------------------------------------------
html Output using style
---------------------------------------------------------------------------------------
in a div

Code: Select all

 <div id="bbb" ...>
element.style {
...
width: 855px;
...
}
---------------------------------------------------------------------------------------


what is the point, that PF MUST override the own settings?
i have in general the following setting

Code: Select all

<h:form id="form_index">
	<p:layout id="abc">
		<p:layoutUnit
			id="aaa"
			position="west"
			resizable="true">
			<ui:include src="aaa.xhtml" />
		</p:layoutUnit>

		<p:layoutUnit
			id="bbb"
			position="center"
			style="width: 500px">
        	<ui:include src="bbb.xhtml" />
	    </p:layoutUnit>
	</p:layout>
</h:form>

My real need, is to make the <p:layoutUnit id="bbb" feeds to the window 100% width, when user changes the size of the window.
by disabling the following setting via Web-Developper on the fly in Chrome, html does the job

Code: Select all

element.style {
...
/* width: 1178px; */
..
}
Thank you in advance...
Armainak
Last edited by armainak on 02 Jul 2014, 10:31, edited 1 time in total.

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

27 Jun 2014, 16:40

please edit your post and use code tags (and correct indentation)

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Majestic-12 [Bot] and 32 guests