You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Stephen Osella <so...@austin.rr.com> on 2006/11/17 16:24:35 UTC

JSF seems to be messing up with my CSS positioning

I am getting wierd behavior from what I would expect my layout positioning 
should be, and (as usual) it is different in both IE and Firefox.  Does JSF 
put hidden elements that the browser messes up on?  Is there a preferred way 
to layout pages in JSF?  I have seen facelets and layout tags.  Any 
recommendations?

Thanks! 


Re: JSF seems to be messing up with my CSS positioning

Posted by Stephen Osella <so...@austin.rr.com>.
Andrew,

Thanks for the tip...

One *wierd* thing that occurred when I did use the Web Developer plug in is 
that when I first load the page, the one div block that is giving me fits is 
rendered badly (basically flowing under a div block to its left).  However, 
when I select "Disable All Styles" in the Web Developer toolbar and then 
re-enable All Styles, that div block is positioned correctly !!!  Why would 
that be the case???  Arggg.....

My page is *very* simple... header/middle/footer with the middle divided 
into 2 columns (each in its own div block).  Each Column has a header image. 
The right block of these two column blocks is the one that flows (initially) 
badly.

Thanks for any help....

Steve 


Re: JSF seems to be messing up with my CSS positioning

Posted by Andrew Robinson <an...@gmail.com>.
You're going to have to be more specific (simple code examples w/
CSS). JSF doesn't put any CSS in the page unless you are using things
like inputCalendar, and those controls shouldn't affect anything but
themselves.

I recommend using firefox with the web developer toolbar to
troubleshoot the CSS ("CSS->Edit CSS" from the toolbar)

-Andrew

On 11/17/06, Stephen Osella <so...@austin.rr.com> wrote:
> I am getting wierd behavior from what I would expect my layout positioning
> should be, and (as usual) it is different in both IE and Firefox.  Does JSF
> put hidden elements that the browser messes up on?  Is there a preferred way
> to layout pages in JSF?  I have seen facelets and layout tags.  Any
> recommendations?
>
> Thanks!
>
>

Re: JSF seems to be messing up with my CSS positioning

Posted by Scott O'Bryan <da...@gmail.com>.
Stephen,

The unfortunate answer to that is...  Possibly.  JSF tags (depending on 
the renderkit of course) will have multiple elements within the tags.  
Especially when using facelets, it is like 90% useless to use tags that 
simply replace existing HTML tags.  Therefore, the tags you are using 
will contain a series of other tags.  Now obviously when a developer 
writes these components, they try to "do the right thing" when creating 
the component and allow you to append styling.  Styling not only works 
different in all browsers, but the interactions of styles (ie one style 
inside of another) is also different from browser to browser.

I would suggest possibly posting some examples of how things are not 
laid out correctly and maybe someone can give you some ideas or, if the 
problem is one of coding, submit a patch to fix the issue.

I do feel your pain, but it is neigh impossible when making a component 
to account for all the style combinations which is why, in Trinidad, we 
have  skinning system which cuts down on these issues by allowing the 
app developer to "skin" the components at a much more granular level.  
Maybe something like this will find its way into other renderkits or JSF 
some day.

Scott

Stephen Osella wrote:
> I am getting wierd behavior from what I would expect my layout 
> positioning should be, and (as usual) it is different in both IE and 
> Firefox.  Does JSF put hidden elements that the browser messes up on?  
> Is there a preferred way to layout pages in JSF?  I have seen facelets 
> and layout tags.  Any recommendations?
>
> Thanks!