How to undo border-style for input boxes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Frostillicus

    How to undo border-style for input boxes

    I work with Interwoven TeamSite in an environment where I do not have access
    to customise the default stylesheet, so the only option available to me is
    to specify an additional stylesheet wherein I can add further
    customisations.

    My problem is that the master stylesheet, which I can not edit or remove,
    includes a CSS selector for all input elements such that the border is thus:

    border: 1px #cccccc solid;

    Is there a way I can specify in my own stylesheet, which is the last one
    referred to, a way to set the style for input boxes back to the default -ie,
    so that input boxes appear "sunken". I've tried everything and nothing seems
    to negate the original style :-( Ideally, I'd like to be able to do this:

    border-style: sunken;

    But this doesn't appear to be in the CSS specification. The only reason I
    want to do this is to distinguish input boxes from the zillions of other
    grey solid lines in TeamSite's templates (whoever designed the interface for
    TeamSite 6 should be shot for forcing everybody to use a stylesheet that is
    so incomprehensibl e!)

    Any ideas?


  • Chris Morris

    #2
    Re: How to undo border-style for input boxes

    "Frostillic us" <frosty@nilspam os.iinet.net.au > writes:[color=blue]
    > My problem is that the master stylesheet, which I can not edit or remove,
    > includes a CSS selector for all input elements such that the border is thus:
    >
    > border: 1px #cccccc solid;
    >
    > Is there a way I can specify in my own stylesheet, which is the last one
    > referred to, a way to set the style for input boxes back to the default -ie,
    > so that input boxes appear "sunken". I've tried everything and nothing seems
    > to negate the original style :-( Ideally, I'd like to be able to do this:
    >
    > border-style: sunken;[/color]

    border-style: inset; you mean?
    [color=blue]
    > But this doesn't appear to be in the CSS specification.[/color]

    Not by that name.

    You can't tell it to go back to the browser default via an additional
    stylesheet, but that would probably do.

    You may also need to do
    html input { }
    rather than
    input { }
    depending on how the stylesheets are set up to work around specificity
    issues.

    --
    Chris

    Comment

    • Spartanicus

      #3
      Re: How to undo border-style for input boxes

      "Frostillic us" <frosty@nilspam os.iinet.net.au > wrote:
      [color=blue]
      >I work with Interwoven TeamSite[/color]

      Are we supposed to know what this is?
      [color=blue]
      >My problem is that the master stylesheet, which I can not edit or remove,
      >includes a CSS selector for all input elements such that the border is thus:
      >
      >border: 1px #cccccc solid;
      >
      >Is there a way I can specify in my own stylesheet, which is the last one
      >referred to, a way to set the style for input boxes back to the default -ie,
      >so that input boxes appear "sunken".[/color]

      Depends on your UA, it's possible with Opera, not with IE or Moz.
      [color=blue]
      >I've tried everything and nothing seems
      >to negate the original style :-([/color]

      Assuming that you are using a user stylesheet: add "!important " to your
      user style rule.
      [color=blue]
      >Ideally, I'd like to be able to do this:
      >
      >border-style: sunken;[/color]

      border:2px inset !important

      But this doesn't result in the original unstyled look, CSS inset/outset
      borders are rather ugly.

      With Opera it's simple: "border:non e !important", and you get the
      original pretty "sunken" borders back.

      --
      Spartanicus

      Comment

      • Frostillicus

        #4
        Re: How to undo border-style for input boxes

        > border-style: inset; you mean?[color=blue]
        >[color=green]
        > > But this doesn't appear to be in the CSS specification.[/color]
        >
        > Not by that name.
        >
        > You can't tell it to go back to the browser default via an additional
        > stylesheet, but that would probably do.
        >
        > You may also need to do
        > html input { }
        > rather than
        > input { }
        > depending on how the stylesheets are set up to work around specificity
        > issues.[/color]

        html input {} or input {} didn't seem to cancel out previous styles but you
        were onto something about the inset. Here's what I ended up doing to make it
        look right:

        input {
        border: 2px #ffffff inset;
        }

        inset by itself was still picking up on the 1px border size from previous
        directives so the 2px and #ffffff produces a perfect facsimile in IE and an
        almost 100% perfect match in Firefox (it's so close you almost can't tell,
        except when flicking between the two very quickly).

        Thanks HEAPS :-)


        Comment

        Working...