Pages

Wednesday, March 14, 2012

CSS - Border and List style


Border Style in CSS

  • Border in Cascading Style Sheet are of following types:
  • Solid, Dotted, Dashed, Double, Groove, Ridge, Inset, Outset, None .
  • Border width types: Thick, Thin, Medium, px.


To type a bullet following code is applied

List-style-type: Decimals, Upper-alpha, Lower-alpha, Upper-roman, Lower-roman,
Disc, Square, Circle, none.
List-style-position: Outside(default) ; Inside.

Example : 1
ol.k1 /* k1 is the class */
{ list-style-type: upper-roman;
}
Output
Before                                   After
1. One                                                I. One
2. Two                                                II. Two

Example : 2
ul.k1 /* k1 is the class */
{ list-style-image:url(“bul.jpg”);
}
Output
Before                                   After
1.One                                     *.One
2.Two                                     *.Two

To Insert Image as Bullet use following method
a) ul.k1{
list-style-type:none;
}

b) ol.k2{
background: url(“abc.jpg”) no-repeat 0px 5px;
padding-left :5px;
}

No comments:

Post a Comment