1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice
  2. If you update to Joomla 3.9.16, you will have to update Fabrik from the latest GitHub version, to fix a bug introduced in Joomla, which makes it impossible to list front end folder locations in backend JForms. This affects things like template selection.
    Dismiss Notice

How to write css in custom calculation on list?

Discussion in 'Standard Support' started by blue-mouse, Dec 14, 2015.

  1. blue-mouse

    blue-mouse Member

    Level: Community
    Hi,

    I have a list with multiple calculations and i use for this list custom template1.
    Some calculations are sophisticated/difficult for fabrik and i write my own code for them.
    My own calculations are "marked": Add2, Add3, ... Add10.

    But i use also 6 fabrik calculations (for 6 columns) and have problem for displayed lines with css.
    I get:
    Procesor - pak.prod.:
    NXP3 1.6 Micrel,TI Rp SM 40km: 4
    NXP3 1.6 Wiznet,TI Alice FastMM 120km: 2
    Karta optyczna - pak.prod.:
    OptoCard ver 1.3, RP: SM 45km: 4
    OptoCard ver 1.3, Alice: FastMM 30km : 2


    I would get something like in my code (Add2 for example) - calculations values on right with for example css:
    margin-left:290px;

    Procesor - pak.prod.:
    NXP3 1.6 Micrel,TI Rp SM 40km: ............................... 4
    NXP3 1.6 Wiznet,TI Alice FastMM 120km: ....................2
    Karta optyczna - pak.prod.:
    OptoCard ver 1.3, RP: SM 45km: ...................................4
    OptoCard ver 1.3, Alice: FastMM 30km : .......................2

    How to write this css for fabrik calculations and in which file in my template1 for list1?
     

    Attached Files:

  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Not sure how you'd get it to align right further than the table cell it is in. But you could put a 'text-align: right' on the td for the calculation, then float the label span to the left ...

    Code (Text):

    .fabrik_calculations .yourtable___yourelement {
       text-align: right;
    }

    .fabrik_calculations .yourtable___yourelement .calclabel {
       float: left;
    }
     
    .. which would left justify the label and right justify the value, putting as much space as possible between the two within the confines of the containing td.

    If you need to push the value further to the right than the td's right side ... you'd probably have to code that in the template, and use your own span structure, rather than the tr/td.

    -- hugh
     

Share This Page