user1794974
user1794974

Reputation: 151

JSF Richfaces Calendar Css override

I display some data-tables on my JSF page, eventually, I got my richfaces calendar to work. but my data-tables CSS overrides the CSS of the calendar so when my popup calendar opens it displays the whole page wide.

JSF 2.2 Java 7 Richfaces 4.3.3

CSS:

table {
    empty-cells: show;
    width: 100%;
}

If I change the width to example 25% the calendar displays correctly but then my data-tables looks horrible. Any way to keep my data tables at 100% and my calendar and maybe a fixed width?

Upvotes: 1

Views: 480

Answers (1)

BalusC
BalusC

Reputation: 1108752

The CSS selector table {} is applied on all HTML <table> elements. If you want to style only some specific HTML <table> elements with CSS, then you should be using a more specific CSS selector.

The <rich:dataTable> generates a <table class="rf-dt">, so the following selector should do:

table.rf-dt {
    ...
}

See also:

Upvotes: 1

Related Questions