문제

I am using PrimeFaces' pieChart. I have .jqplot-data-label items that represent the data labels of the chart. They are automatically positioned absolutely and I cannot position them relatively to their current position because their position is in each case automatically given by the jqplot PieRenderer.

If I want to position them 10 pixels under the position they are now, I do the following:

.jqplot-data-label { margin-top: 10px !important; }

but I cannot position them 10 pixels above the position they are now. What can I do to achieve this?

도움이 되었습니까?

해결책

Negative positioning worked for me.

.jqplot-data-label { margin-top: -10px !important; }

It also helped to read the following article: The Definitive Guide to Using Negative Margins

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top