Adding CSS class to element

  • dama
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 45
  • Thank you received: 1

dama created the topic: Adding CSS class to element

HI,

Haven't posted in a while so if this post belongs to different subforum please move it.

Is it possible to add CSS class to any element in breezing forms?

I would like to change the styling of checkbox and I'm having trouble doing it.
Label and input field don't have the same parent element which is div with empty class name.

So my question is, is it possible to add CSS class to single element in form?

Kind regards
#235762
  • Posts: 5896
  • Karma: 118
  • Thank you received: 544

MarioPuco replied the topic: Adding CSS class to element

Hi,

To apply custom CSS to your form go to : Advanced properties > More options > Form pieces and in the Before Form section set Type to Custom.
echo '
<style>
//YOUR CSS HERE
</style>
';

Inside you can add your CSS which will have effect only on the actual form.

Regards,
Mario

Satisfied with our Support ?
PayPal Tip
===============================================
Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
#235769
  • dama
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 45
  • Thank you received: 1

dama replied the topic: Adding CSS class to element

Hi MarioPuco,

That is not what I want.
I want to change the style of a checkbox in every form on web site, and not in a single/one form.

This is how the code looks like:
<div class="">
	<label class="control-label bfLabelBlock" id="bfLabel2567" for="ff_elem2567">Prihvaćam <a href="#privatnost" data-rel="lightcase" title="Pravila privatnosti">pravila privatnosti</a>
	</label>
	<span class="">
		<input style="vertical-align: baseline;" class="ff_elem" type="checkbox" name="ff_nm_privola[]" value="checked" id="ff_elem2567">
	</span>
</div>
which looks like this:


And I want it to look like this:


So I know what CSS to add but I'm having trouble targeting the elements as I explained in first post.

Regards
#235770
Attachments:
  • Posts: 5896
  • Karma: 118
  • Thank you received: 544

MarioPuco replied the topic: Adding CSS class to element

Dama,

You can target your element by ID.
Example :
echo '
<style>
#ff_elem2567 {
height: 100px !important;
width:100px !important;
}
</style>
';

You can target the element class also, but whatever suits you.

Regards,
Mario

Satisfied with our Support ?
PayPal Tip
===============================================
Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
#235772
  • Posts: 207
  • Karma: 1
  • Thank you received: 23

Eddy.vh replied the topic: Adding CSS class to element

Hello.

Only if you do not use a bootstrap theme, in the advanced properties of the checkbox, display the title position "top" should fix the case.

Regards.
#235773
  • dama
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 45
  • Thank you received: 1

dama replied the topic: Adding CSS class to element

I inserted those screenshots wrongly, I want it to look like on the first one and currently it looks like on second.

Unfortunately I use default bootstrap theme :(
Anyway, I changed it to group checkbox and have only one box to check.

Thanks for letting me know that other themes have classes and ids, or at least more than default bootstrap theme. Will play with it in the future now is too late for a change.

Thanks for the help both of you.

Kind regards
#235776
Moderators: ForumSupporttomeperica
Time to create page: 0.271 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here