HTML and CSS Reference
In-Depth Information
display
:
block
;
margin
:
-10px 0 0 -60px
;
padding
:
0 10px
;
width
:
40px
;
}
Now for the meat in our endangered species sandwich: the bars themselves. Let's start with
the container element for the bars and the columns:
/* Graph bars */
.bars
{
height
:
253px
;
position
:
absolute
;
width
:
100%
;
z-index
:
10
;
}
.bar-group
{
float
:
left
;
height
:
100%
;
margin
:
0 15px
;
position
:
relative
;
width
:
76px
;
}
Nothing too complicated here. We're simply setting some dimensions for the container, and
setting a
z-index
to make sure it appears in front of the y-axis markings.
Now for each individual
.bar
:
.bar
{
border-radius
:
3px 3px 0 0
;
bottom
:
0
;
cursor
:
pointer
;
height
:
0
;
position
:
absolute
;