Question - Can I attach more than one declaration to a selector?
Answer -
Yes. If more than one declaration is attached to a selector they must appear in a semi colon separated list, e.g.;
Selector {declaration1; declaration2}
P {background: white; color: black}
Border around a table?
Try the following:
.tblboda {
border-width: 1px;
border-style: solid;
border-color: #CCCCCC;
}
/*color, thickness and style can be altered*/
You put this style declaration either in
an external stylesheet, or you can stuff it in
the
section, like:
and apply it to the table as follows:
Content text and more content |
That should give you a grey thin border around this table.
If you want the border to 'shrink wrap' around the table, then you have to use the
tag instead the
tag. But that is not quite proper CSS or HTML, because a is for inline elements. A table is not an inline element, therefore the correct tag is a . If you play around with it a bit then you have a good chance to achieve what you want and still have correct HTML/CSS.
The other way would be that you apply the class .tblboda directly to the table (for IE and other contemporary browsers), like
and you define another class for each stylesheet: .tblboda2
In the NN4.xx stylesheet, you use the same properties as above, and in the IE and other contemporary browsers you carefully set all those properties to default, like {border-style: none;}
Then you wrap the table in the with the class .tblboda2 (NN4.xx does that) (IE a.o.c.b. don't do anything, because the border-style is set to "none" = no border at all).
This way you have a table that is wrapped in a nice little border: .tblboda2 for NN4.xx, .tblboda for IE and other modern browsers.
Comment(S)
Show all Coment
Leave a Comment
|
Share your email for latest updates
Copyright 2017, All Rights Reserved. A Product Design BY CoreNet Web Technology