1 Reply Latest reply on Mar 27, 2009 8:45 PM by brucekpdx

    Overriding inplaceinput css

      I have two inplaceinput components but the default css has no margin around them.

      <rich:inplaceInput defaultLabel="Enter First Name" value="#{bean.firstName}" /><br
      <rich:inplaceInput defaultLabel="Last Name" value="#{bean.LastName}" styleClass="inputField"/>

      Looking at the source of my html, I can see the 3 css defs being used.
      So I override the css in richfaces by putting my definitions in my own css file as such:

      .rich-inplace {
      font-style: italic;
      border-style: inset;
      margin-bottom:10px;
      font: inherit;
      }
      .rich-inplace-view {
      border-bottom-width: 1px;
      border-bottom-style: dashed;
      /*padding-left:3px;
      padding-right:3px;*/
      white-space:nowrap;
      }
      .rich-inplace-field {
      border-width: 1px;
      border-style: inset;
      margin:10px;
      padding:0px 0px 0px 0px;
      position: absolute;
      top:0px;
      left:0px;
      font: inherit;
      }

      Note that I changed the default font to italics and that worked. But the margin is still 0 around the two components.

      Any suggestions?
      Thanks,
      Bruce

        • 1. Re: Overriding inplaceinput css

          Using firebug, it appears the margin attribute is being acted on, just not the way I am used to in JSF.

          The margin is increased on top and side but does not affect any other component. The bottom margin is not affected at all.

          I really want to have a little space between the two inplaceinput components. Using the margin-bottom does not increase the space between the two.

          I think there is something in the big picture that I am missing here.

          BTW: using richfaces 3.3 and firefox 3.0.7