CSS Specificity Body - Form -
i have several pages , single external style sheet. css file has following:
body { /*set background image*/ background: url("../img/background/main.jpg"); padding: 20px 20px; } body form{ border: double; }
according have been learning body form more specific , should show double line border around elements of type form inside of body.
however, in testing not unless move above css body {} selector meaning body selector in css file overriding body form.
what doing wrong?
you correct body form
take precedence on form
, problem in border declaration. when specifying values border property should include borders width , color style.
border: double 3px #000;
this set elements border style of double, width of 3px, , color of black.
make note when using border-style double minimum border-width make both borders visible 3px.
here example.
Comments
Post a Comment