Forum

Forum - DatingScript

Online dating software

You are not logged in.

#1 2019-10-15 22:06:33

littlebit
Member
Registered: 2016-02-21
Posts: 428

How to move styling to custom.css ?

I created a mod, let assume this is the result:

<b><FONT FACE="" SIZE="" COLOR="red"><?=__('usergroup1', 'custom')?> </FONT></b>

This is working fine,
but I believe it can be done better by moving the styling aspects to a custom.css file.
Can somebody explain how this can be done ? Or has somebody a link to a tutorial ?

Offline

#2 2019-10-16 06:30:49

radioact
Staff
Registered: 2013-05-26
Posts: 214

Re: How to move styling to custom.css ?

Hello,
First, what you have is not even inline css, so first it's better to read about css.
For example this: https://www.w3schools.com/css/

So inline styling would be.

<b style="color:red;"><?=__('usergroup1', 'custom')?></b>

then you would want it to move styling to css

<b class="group_title"><?=__('usergroup1', 'custom')?></b>

and put this to your custom.css or custom.less

.group_title {
color:red;
}

So from this moment you will be able to adjust styles without editing every place where you used your <b> to show group name.

Read more about CSS3 and LESS and you will see real power of styling.

Best regards,
Ramil

Offline

#3 2019-10-16 16:46:55

littlebit
Member
Registered: 2016-02-21
Posts: 428

Re: How to move styling to custom.css ?

radioact wrote:

So from this moment you will be able to adjust styles without editing every place

Thanks Ramil !!

Offline

Board footer