jquery - CSS text positioning - circle backround on a tag -
i have created navigation circle of circles, need text each link center, can line height if there 1 word of them have more 1 word.
how can work?
sample: http://jsfiddle.net/elogicmedia/nvpyq/12/
an image show talking about. see text @ top of each link.
my css code
nav { position: relative; top: 200px; left: 200px; font-family: helvetica, arial; } li { list-style: none; } { position: absolute; text-decoration: none; width:98px; height:98px; border-radius:50%; line-height:1.5em; text-align:center; font-family: helvetica, arial; background-color: #c0d9d9; } a:link, a:visited { color: #000; font-size: 12px; } a:hover { color: red; }
this not too hard working js. can calculate height of each a
, height of text wrapping in span. use position: relative
on span, , set top
appropriate middle point based on calculation.
Comments
Post a Comment