How to get custom css to load after richfaces?

Tags: css,jsf,jsf-2,richfaces

Problem :

I have found this thread where user ramkumarps shows a way to load custom CSS after richfaces loads their css, but I would rather not have it load after the content has been loaded.

Is there any way to have it loaded right after richfaces and still in the head tag?

Solution :

Regardless of where you use the <h:outputStylesheet> tag, the stylesheet is always rendered in the head. The only difference it makes when you add inside the <h:body> is that it will be added after all Richfaces stylesheets have been loaded. Also as mentioned in the example you do not have to add them at the last. You can just add them after <h:body> opening tag which is sufficient to override Richfaces style.

You can check this by opening the Developer tools inside your browser and see that it renders in the head.

    CSS Howto..

    How to disable google translator plug in and set margin-top: to 0px for body element?

    How to make fixed navbar top like w3school

    How to remove CSS triangles?

    How specify two css classes: from property and conditional class

    CSS: how to make scrollbar appear outside div's border?

    Does anyone know how to create this 3d flip animation via CSS?

    How to isolate PrimeFaces Widget from being affected by main site CSS

    How can I indent all text in a paragraph except the first line?

    How to have an array of images side by side using css/html

    how to change CSS styles dynamically using php/Mysql..i want to create themes that are unique to each user?

    (CSS-Javascript-Jquery) How to make thumbnails slider for a carousel? [closed]

    Base 64 CSS background image not showing in IE

    CSS selector: How to select element sibling AND element itself?

    How to create mirrored image effect with CSS single element

    How to start off on a tab built in javascript/html instead of it being blank and having to click on one

    How to add vertical and horizontal separators between inline elements in CSS?

    Three extra pixels at the bottom of the page unaccounted for and not sure how to get rid of them?

    How to float elements to the center in CSS?

    How to use Bootstrap 3 grid if elements are tiled with different height and widths

    How do stop elements from changing (properties) during javascript events?

    How to overlap items in an unordered list using CSS?

    How can I make a fluid width header with text-overflow ellipsis without wrapping?

    How to prevent this H2-tag from half disappearing?

    How do I suppress errors in IntelliJ Idea 12

    How can we create custom style for Jquery-ui dialog window in PHP?

    How to test a web designer on css layouts?

    How to strike through obliquely with css

    How to apply css styles in embed widget

    How to remove an empty line between two navbars

    How to make this text bigger?