problem with CSS with PrimeFaces

2

I'mwantingtostriptheedgesoftheModefield,ifIcannot,I'mfindingthatafisherythatI'mwrong.

<?xmlversion="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.org/ui"
    xmlns:f="http://java.sun.com/jsf/core">
<h:head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <h:outputStylesheet library="css" name="style.css"  />
</h:head>
<h:body>

    <h:form id="frm">

        <p:messages autoUpdate="true" />
        <f:facet name="header">
    Cadastro de Contratos Algaworks
    </f:facet>

        <p:panelGrid columns="2">
            <p:outputLabel value="Razao Social" for="razao" />
            <p:inputText id="razao" value="#{cadastroContratoBean.razaoS}"
                required="true" />
            <p:outputLabel value="CNPJ" for="cnpj" />
            <p:inputMask id="cnpj" mask="99.999.999/9999-99" maxlength="20"
                value="#{cadastroContratoBean.cnpj}" />
            <p:outputLabel value="Cidade do Contrato" for="cidade" />
            <p:autoComplete id="cidade"
                value="#{cadastroContratoBean.cidades_do_Contrato}" required="true"
                completeMethod="#{cadastroContratoBean.sugerirCidades}" />

            <p:outputLabel value="Modalidade" for="modalidade" />
            <p:selectOneRadio value="#{cadastroContratoBean.tipo}" id="modalidade" required="true" styleClass="sem-bordas">
                <f:selectItem itemLabel="EAD" itemValue="EAD" />
                <f:selectItem itemLabel="Presencial" itemValue="Presencial" />

            </p:selectOneRadio>

        </p:panelGrid>

        <p:commandButton value="Cadastrar"
            action="#{cadastroContratoBean.Cadastrar}" />

    </h:form>
</h:body>
</html>

CSS

.sem-bordas td{
    border: none;
    padding: 5px;
}

    
asked by anonymous 26.08.2014 / 20:28

1 answer

2

You can do the following test:

  • Add the! important ex .: .sem-bordas td{ border: none !important; padding: 5px !important; } To identify if you have any class overlapping your added style.

  • I also do not know if td exists in the html generated by f: selectItem.

  • Important: The best way to identify these problems is to inspect the element by the browser itself.

        
    26.08.2014 / 20:59